Fantastic!
Thanks! On Fri, Oct 9, 2009 at 8:17 AM, David Warde-Farley <d...@cs.toronto.edu> wrote: > > 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 > Cython-dev@codespeak.net > http://codespeak.net/mailman/listinfo/cython-dev > _______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev