[Numpy-discussion] numpy.any segfaults for large object arrays

Martin Manns mmanns@gmx....
Mon Mar 24 08:05:05 CDT 2008


Hello,

I am encountering a problem (a bug?) with the numpy any function.
Since the python any function behaves in a slightly different way,
I would like to keep using numpy's.

Here is the problem:

$ python
Python 2.5.1 (r251:54863, Jan 26 2008, 01:34:00) 
[GCC 4.1.2 (Gentoo 4.1.2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.version.version
'1.0.4'
>>> numpy.version.release
True
>>> small_zero = [0] * 1000
>>> large_zero = [0] * 1000000
>>> small_none = [None] * 1000
>>> large_none = [None] * 1000000
>>> any(small_zero)
False
>>> any(large_zero)
False
>>> any(small_none)
False
>>> any(large_none)
False
>>> any(numpy.array(small_zero))
False
>>> any(numpy.array(large_zero))
False
>>> any(numpy.array(small_none))
False
>>> any(numpy.array(large_none))
False
>>> numpy.any(numpy.array(small_zero))
False
>>> numpy.any(numpy.array(large_zero))
False
>>> numpy.any(numpy.array(small_none))
False
>>> numpy.any(numpy.array(large_none))
Segmentation fault

The segfault occurs for other object arrays as well.
Any idea how to get around this?

Thanks in advance

Martin

P.S. I tried the bug tracker but my e-mail does not seem to show up.
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger


More information about the Numpy-discussion mailing list