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

Travis Oliphant oliphant.travis at ieee.org
Wed Jul 19 11:34:13 EDT 2006


Yves Frederix wrote:
> 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
>
>   
A bad attempt at allowing other threads to run is at fault.  We can't 
release the GIL for casting to and/or from strings....

This should be fixed now.

-Travis





More information about the NumPy-Discussion mailing list