On 8-Oct-09, at 7:38 PM, Chris Colbert wrote:

> Since I have a "cimport numpy as np" at the top of my cython file,
>
> array1.shape == array2.shape
>
> is only true if array1 IS array2 because .shape return the npy_intp*
> pointer to the shape array.
>
> Is there a way for me check if the values in the shape array are equal
> (ala python) without having to drop into a loop?

You can use the macro PyArray_SAMESHAPE(a1, a2):

http://docs.scipy.org/doc/numpy/reference/c-api.array.html#PyArray_SAMESHAPE
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to