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

Joris De Ridder Joris.DeRidder@ster.kuleuven...
Mon Mar 24 10:29:56 CDT 2008


I cannot confirm the problem on my intel macbook pro using the same  
Python and Numpy versions. Although any(numpy.array(large_none)) takes  
a significantly longer time than any(numpy.array(large_zero)), the  
former does not segfault on my machine.

J.




On 24 Mar 2008, at 14:05, Martin Manns wrote:

> 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
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the Numpy-discussion mailing list