nzmath.matrix
The class is for matrix.
row and column must be a positive integer, and assuming row not be equal to column.
compo must be a list form.
In general, given matrix size unspecified, you should call createMatrix for your profit.
create a copy of self (other instance).
return upper triangulated matrix.
return submatrix deleted i-th row and j-th column.
operator | explanation |
M + N | Return the sum of matrices M and N. |
M - N | Return the difference of matrices M and N. |
M * N | Return the product of M and N. N must be matrix,vector or scaler |
M / d | Return the division of M by d. d must be scalar. |
-M | Return the matrix whose coefficients have inverted signs of M. |
+M | Return the same matrix with M. Simplification is carried out if possible. |
M == N | Return whether M and N are equal or not. |
M != N | Return whether M and N are different or not. |
M[i,j] | Return the coefficient of i-th row, j-th column term of matrix M. |
M[i] | Return the vector of i-th column term of matrix M. |
M[i,j] = c | Replace the coefficient of i-th row, j-th column term of matrix M by c. |
M[j] = c | Replace the vector of i-th column term of matrix M by vector c. |
repr(M) | Return the repr string of the matrix M. string represents list concatenated row vector lists. |
str(M) | Return the str string of the matrix M. |