[Numpy-discussion] bug report ?

Yves Revaz yves.revaz@obspm...
Fri Feb 8 04:28:15 CST 2008

Dear list,

I'm using old numarray C api with numpy.
It seems that there is a bug when using the PyArray_FromDims function.

for example, if I define :
acc = (PyArrayObject *)

where pos is PyArrayObject *pos;  (3x3 array)

when using return PyArray_Return(acc);
I get
array([], shape=(3, 0), dtype=float32)

It is possible to make everything works if I use the following lines
instead :
int   ld[2];
acc = (PyArrayObject *) PyArray_FromDims(pos->nd,ld,pos->descr->type_num);

So, the problem comes from the pos->dimensions.

Is it a known bug ?

(I'm working on a linux 64bits machine.)



More information about the Numpy-discussion mailing list