[Numpy-discussion] Differences Between Arrays and Matrices in Numpy

Nadav Horesh nadavh@visionsense....
Thu Jul 30 12:26:51 CDT 2009

Matrices are 2D array with some additional properties that make them more handy for linear algebra. For instance 
is a matrix multiplication, while
is an element by element multiplication. However

np.dot(arr1, arr2)

is a matrix multiplication between two arrays.

As a rule, you can replicate any matrix operation with arrays. If you do not do linear-algebra only calculation, you better use arrays.


-----הודעה מקורית-----
מאת: numpy-discussion-bounces@scipy.org בשם Nanime Puloski
נשלח: ה 30-יולי-09 20:14
אל: numpy-discussion@scipy.org
נושא: [Numpy-discussion] Differences Between Arrays and Matrices in Numpy
What are some differences between arrays and matrices using the Numpy
library? When would one want to use arrays instead of matrices and vice

More information about the NumPy-Discussion mailing list