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

Martin Manns mmanns@gmx....
Mon Mar 24 13:13:22 CDT 2008


Bruce Southey <bsouthey@gmail.com> wrote:> Hi,
> This also crashes by numpy 1.0.4 under python 2.5.1. I am guessing it
> may be due to numpy.any() probably not understanding the 'None' .

I doubt that because I get the segfault for all kinds of object arrays that I try out:

~$ python
Python 2.4.5 (#2, Mar 12 2008, 00:15:51) 
[GCC 4.2.3 (Debian 4.2.3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> small_obj = numpy.array([1]*10**3, dtype="O")
>>> numpy.any(small_obj)
True
>>> large_obj = numpy.array([1]*10**6, dtype="O")
>>> numpy.any(large_obj)
Segmentation fault
~$ python
>>> import numpy
>>> large_strobj = numpy.array(["Yet another string."]*10**6, dtype="O")
>>> numpy.any(large_strobj)
Segmentation fault

Martin


-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx


More information about the Numpy-discussion mailing list