[NumPy-Tickets] [NumPy] #1590: complex array to scalar conversion fails

NumPy Trac numpy-tickets@scipy....
Sun Aug 22 08:27:37 CDT 2010

#1590: complex array to scalar conversion fails
 Reporter:  drizzd  |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:  2.0.0   
Component:  Other   |     Version:  1.3.0   
 Keywords:          |  
 While float(array([1])) returns 1.0 as expected, complex(array([1j]))

  TypeError: can't convert complex to float

 I expected it to succeed and return 1.0j.

 I suspect this is the same error triggered by the following code.

  a = zeros(2, complex)
  b = ones(1) * 1j
  a[0] = b

Ticket URL: <http://projects.scipy.org/numpy/ticket/1590>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list