[Numpy-discussion] PyArray_DIMS problem

Gennan Chen gnchen at mac.com
Wed Dec 20 19:44:07 EST 2006


Hi!

I have problem with this function call under FC6 X86_64 for my own  
numpy extension

printf("\n %d %d %d", PyArray_DIM(imgi,0),PyArray_DIM(imgi, 
1),PyArray_DIM(imgi,2))

it gave me

166 256 256

if I tried:

int *dim;
dim = PyArray_DIMS(imgi)
printf("\n %d %d %d", dim[0], dim[1], dim[2]);

it gave me 166 0 256

Numpy version:

In [2]: numpy.__version__
Out[2]: '1.0.2.dev3487'

I did test it under OS X 10.4.8 on MacPro. Those two methods gave me  
the exact results. So, what happens here ??

Gen-Nan Chen




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20061220/f620bbfa/attachment.html>


More information about the NumPy-Discussion mailing list