[Numpy-discussion] numarray: Python crash

Todd Miller jmiller at stsci.edu
Tue Jan 3 15:36:18 EST 2006


Hi Edward,

This is working OK for me on Fedora Core 4 x86_64 using numarray-1.5.0 
and Python-2.4.2.   I masked the overflow exception with try/except and 
did 10000 in a loop without problems.   

Are you getting a core dump file?   If so,  try:

% gdb python core*   # on FC4 cores are annotated with PID so you may 
need to rm a few
(gdb) where
.... C function traceback

Let me know what you see.

Todd

Edward C. Jones wrote:

> #! /usr/bin/env python
>
> import numarray
>
> """I have an AMD64 PC with Debian unstable for i386 on it. I use Python
> 2.4.2 and numarray 1.5.0. I compile these myself.
> """
>
> arr = numarray.array([-2000000000L], 'UInt32')
> arr = numarray.array([-2000000000L], 'UInt32')
>
> """If I execute one of the two statements I get:
>
> Exception exceptions.OverflowError: "can't convert negative value to 
> unsigned long" in 'garbage collection' ignored
> Fatal Python error: unexpected exception during garbage collection
> Aborted
>
> If I execute both statements, I get:
>
> Traceback (most recent call last):
>  File "./bug2.py", line 10, in ?
>    arr = numarray.array([-2000000000L], 'UInt32')
>  File 
> "/usr/local/lib/python2.4/site-packages/numarray/numarraycore.py", 
> line 354, in array
>    type=_typeFromTypeAndTypecode(type,typecode,dtype)
>  File 
> "/usr/local/lib/python2.4/site-packages/numarray/numarraycore.py", 
> line 278, in _typeFromTypeAndTypecode
>    for a in [type, typecode, dtype]:
> OverflowError: can't convert negative value to unsigned long
> """
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion






More information about the NumPy-Discussion mailing list