[NumPy-Tickets] [NumPy] #2059: Numpy float plus/times poly1d gives array

NumPy Trac numpy-tickets@scipy....
Mon Feb 20 11:55:26 CST 2012


#2059: Numpy float plus/times poly1d gives array
---------------------+------------------------------------------------------
 Reporter:  ezander  |       Owner:  somebody   
     Type:  defect   |      Status:  new        
 Priority:  normal   |   Milestone:  Unscheduled
Component:  Other    |     Version:  1.5.1      
 Keywords:           |  
---------------------+------------------------------------------------------
 Multiplication or addition of a poly1d object with a numpy float from the
 left, gives an ndarray object, instead of an poly1d. See the following
 code:

 In [38]: a=np.float64(3.0)
 In [39]: a+np.poly1d([1,1,1])
 Out[39]: array([ 4.,  4.,  4.])
 In [40]: np.poly1d([1,1,1])+a
 Out[40]: poly1d([ 1.,  1.,  4.])

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


More information about the NumPy-Tickets mailing list