[NumPy-Tickets] [NumPy] #1778: Object arrays of complex arrays can't be multiplied by numpy floats

NumPy Trac numpy-tickets@scipy....
Tue Mar 22 15:59:10 CDT 2011


#1778: Object arrays of complex arrays can't be multiplied by numpy floats
------------------------------+---------------------------------------------
 Reporter:  AndreasKloeckner  |       Owner:  somebody   
     Type:  defect            |      Status:  new        
 Priority:  normal            |   Milestone:  Unscheduled
Component:  Other             |     Version:  1.4.1      
 Keywords:                    |  
------------------------------+---------------------------------------------
 {{{
 >>> import numpy as np
 >>> z = np.array([1j])
 >>> zz = np.zeros((2,), dtype=object)
 >>> zz.fill(z)
 >>> zz
 array([[ 0.+1.j], [ 0.+1.j]], dtype=object)
 >>> zz * np.float64(5)
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and
 'numpy.float64'
 >>> zz * 5.
 array([[ 0.+5.j], [ 0.+5.j]], dtype=object)
 >>>
 }}}

 In my humble estimation, that TypeError shouldn't be happening.

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


More information about the NumPy-Tickets mailing list