[NumPy-Tickets] [NumPy] #1907: treat an array with a single value as a scaler

NumPy Trac numpy-tickets@scipy....
Thu Jul 14 14:39:05 CDT 2011


#1907: treat an array with a single value as a scaler
--------------------+-------------------------------------------------------
 Reporter:  rgrout  |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  1.6.0      
 Keywords:          |  
--------------------+-------------------------------------------------------
 If I have an array([3]) (an array with a single value), I should be able
 to take the dot product with another vector or matrix as though I were
 multiplying by a scalar.

 For example.
 [[[
 a=array([3])
 b = array([3,5,6,2,3]).reshape((2,2))
 c = rand(5,5)
 np.dot(a,b)==3*b
 np.dot(a,c)==3*c
 ]]]

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


More information about the NumPy-Tickets mailing list