[Numpy-tickets] [NumPy] #412: segault in numpy.float64(z) for complex z

NumPy numpy-tickets at scipy.net
Sun Jan 7 23:06:01 CST 2007

#412: segault in numpy.float64(z) for complex z
 Reporter:  timl        |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:          
Component:  numpy.core  |     Version:          
 Severity:  normal      |    Keywords:          
 Passing a complex value to N.float or N.int raises a type error as

 In [1]: import numpy as N

 In [2]: N.float(2.5 + 2.5j)
 exceptions.TypeError                                 Traceback (most
 recent call last)

 /home/timl/src/scipy/Lib/sparse/sparsetools/<ipython console>

 TypeError: can't convert complex to float; use abs(z)

 Passing to any of int32, int64, float32 or float64 (I havn't tested other
 types) results in a

 In [6]: N.float64(2.5 + 2.5j)
 Segmentation fault (core dumped)

 This is with

 In [2]: numpy.__version__
 Out[2]: '1.0.2.dev3497'

 And crashes on my macbook and also my 64bit linux box.

Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/412>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list