Also, what about PyArray_PutMask()

That function also has a line like "int i, chunk, ni, max_item, nv,
tmp;"

Should that be changed as well?

(Your patch does not fix my original issue.)

 

BTW, in numpy 1.3, that is present in numpy/core/src/multiarraymodule.c.


Can someone please give me a temporary patch to test? I am not familiar
with numpy codebase!

 

-Ashwin

 

 

I can confirm this bug for the last svn.

 

Also:

>>> a.put([2*1024*1024*1024 + 100,], 8)

IndexError: index out of range for array

 

in this case, I think the error is that in

numpy/core/src/multiarray/item_selection.c

in PyArray_PutTo line 209 should be:

    intp i, chunk, ni, max_item, nv, tmp;

instead of:

    int i, chunk, ni, max_item, nv, tmp;

 

fixing it as suggested:

>>> a.put([2*1024*1024*1024 + 100,], 8)

>>> a.max()

8

 

 

_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to