Hi,

> You are thinking too difficult. Forget about numpy's C API, you don't
> have to use it.
>
> In Cython this is:
>
> import numpy as np
> cimport numpy as np
>
> 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?

Cheers,

Matthew
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to