duly noted. Thank you.
On Fri, Oct 9, 2009 at 10:48 AM, Dag Sverre Seljebotn <[email protected]> wrote: > Chris Colbert wrote: >> Fantastic! >> >> Thanks! >> On Fri, Oct 9, 2009 at 8:17 AM, David Warde-Farley <[email protected]> >> 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 > > Make sure to call np.import_array() first! > > -- > Dag Sverre > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
