>> cdef np.ndarray[dt_t, ndim=1, mode="c"] arr >> arr = np.ndarray(shape=(n,), dtype=dt, buffer=data) > > Do I not then need to know the array dtype at compile time?
and - does this in fact optimize the array creation time (as opposed to subsequent array indexing)? I'm creating thousands of arrays of various dtypes known only at run time, Cheers, Matthew _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
