[Cython] Problems accessing ndarray attributes
Ilmar Wilbers
ilmarw at simula.no
Sat Jan 17 13:41:17 CET 2009
Hi list,
While trying to wrap an external C library, I have stumbled upon some
question. A lot of them were answered by going through the mailing list
archive, however a few remain.
I have the following function with arguments:
def tridag(np.ndarray[DTYPE_t, ndim=1, negative_indices=False] a)
I want to do some assertions on the array a:
assert a.dtype == np.float32
assert a.flags['C_CONTIGUOUS']
but keep getting an error "Attempting to index non-array type 'int'".
Checking the type of a.flags indicates that it is in int. What am I missing?
ilmar
More information about the Cython-dev
mailing list