[Numpy-discussion] astype() causes segmentation fault when converting from string

Yves Frederix yves.frederix at cs.kuleuven.be
Wed Jul 19 09:45:08 CDT 2006


Hi,

The latest svn version of numpy seems to be causing a segmentation fault
when converting an array containing strings to floats using .astype().
It only seems to happen when converting 'from' strings. Casting between
numerical types and 'to' strings is no problem.

 :yves $ python -c "import numpy as N; print N.__version__; a =
N.asarray('2'); a.astype(float);print 'OK';"
 0.9.9.2844
 Segmentation fault

An older version of numpy (the one I used before this upgrade) works
perfectly though:

 :yves $ python -c "import numpy as N; print N.__version__; a =
N.asarray('2'); a.astype(float);print 'OK';"
 0.9.9.2655
 OK

Cheers,
YVES




More information about the Numpy-discussion mailing list