On 4/3/2013 3:18 PM, [email protected] wrote: > A 5*5 matrix multiplies another matrix, we expect answer to be error or a 5*? > matrix, not a 1*5 matrix.
That is what happens. But you are post"multiplying" a matrix by a one-dimensional list. What should happen then? That is the question. One could argue that this should just raise an error, or that the result should be 1d. In my view, the result should be a 1d array, the same as I.A.dot(x). But the maintainers wanted operations with matrices to return matrices whenever possible. So instead of returning x it returns np.matrix(x). My related grievance is that I[0] is a matrix, not an array. There was a long discussion of this a couple years ago. Anyway, the bottom line is: don't mix matrices and other objects. The matrix object is really built only to interact with other matrix objects. Alan _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
