[Numpy-discussion] multiply a lign matrix with a column matrix should return a scalar( matlab yes, numpy no)!!!
Wed Feb 3 02:20:23 CST 2010
> if i multiply two matrix, one with a unique line and the second one with a unique column, i should have a scalar:
> matrix([[1, 3, 1]])
> Matlab give me a scalar, Numpy does not...
Matlab does not have the concept of scalar: everything is a matrix
(size(1) returns (1, 1) in matlab). NumPy matrix objects are more or
less the same: every operation between two matrices return a matrix.
Although natural coming from a matlab background, I would advise against
using matrices because they look more familiar. I did the same mistake
when I started using NumPy, and getting used to NumPy arrays took me
More information about the NumPy-Discussion