Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cdef-ing a memory view or array with a custom numpy dtype #2760
I am trying to declare an array or a memory-view with a custom dtype, but I'm getting compilation errors:
cimport cython import numpy as np cimport numpy as np MY_DTYPE = np.dtype([ ('field_a', np.float32), ('field_b', np.float32), ]) def f(): cdef MY_DTYPE.type [:] array
I've checked the docs, passed issues and the mailing list but could not find any example that didn't use numpy's built-in dtypes. This might be related to #2022?
Any help would be greatly appreciated!