[NumPy-Tickets] [NumPy] #2057: Invalid output shape from np.dot with matrixes

NumPy Trac numpy-tickets@scipy....
Fri Feb 17 05:10:43 CST 2012


#2057: Invalid output shape from np.dot with matrixes
-----------------------------+----------------------------------------------
 Reporter:  pv               |       Owner:             
     Type:  defect           |      Status:  new        
 Priority:  normal           |   Milestone:  Unscheduled
Component:  numpy.matrixlib  |     Version:  1.6.1      
 Keywords:                   |  
-----------------------------+----------------------------------------------
 http://permalink.gmane.org/gmane.comp.python.scientific.user/31095

 Consider this:
 {{{
 import numpy as np
 x = np.arange(5)
 I = np.asmatrix(np.identity(5))
 print np.dot(I, x).shape
 # -> (1, 5)
 }}}
 while `(5, 1)` would be what is expected based on usual linear algebra
 rules.

 It might also be a mistake to return a matrix from mixed matrix--array
 computations.

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


More information about the NumPy-Tickets mailing list