Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - The difference between "array" and "matrix" in cupy or numpy
The difference between "array" and "matrix" in cupy or numpy
There is no difference between Cupy and numpy in the use of matrices and arrays, but there are some differences at the cognitive/creative level.

In numpy and cupy, the differences between the data types of Array and Matrix are as follows:

(1) Examples of "data types" created by various functions in numpy:

(2) The only way to convert the original "array into matrix" in 2)numpy:

(3) When the original "array is higher than two dimensions", it cannot be converted into a matrix;

(4) The "two-dimensional array" can be directly used for matrix operations of various linear algebras (without being converted into matrices first);

(5) "Three-dimensional and above arrays", linear algebraic matrix operation, the result is the same as low-dimensional matrix!