[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
mat1*mat2
is a matrix multiplication, while
arr1*arr2
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.
Nadav
-----הודעה מקורית-----
מאת: 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
versa?
More information about the NumPy-Discussion
mailing list