numpy.matlib
This module contains all functions in the numpy namespace, with the following replacement functions that return matrices instead of ndarrays.
numpy
matrices
ndarrays
Functions that are also in the numpy namespace and return matrices
mat(data[, dtype])
mat
Interpret the input as a matrix.
matrix(data[, dtype, copy])
matrix
Note
It is no longer recommended to use this class, even for linear
asmatrix(data[, dtype])
asmatrix
bmat(obj[, ldict, gdict])
bmat
Build a matrix object from a string, nested sequence, or array.
Replacement functions in matlib
matlib
empty(shape[, dtype, order])
empty
Return a new matrix of given shape and type, without initializing entries.
zeros(shape[, dtype, order])
zeros
Return a matrix of given shape and type, filled with zeros.
ones(shape[, dtype, order])
ones
Matrix of ones.
eye(n[, M, k, dtype, order])
eye
Return a matrix with ones on the diagonal and zeros elsewhere.
identity(n[, dtype])
identity
Returns the square identity matrix of given size.
repmat(a, m, n)
repmat
Repeat a 0-D to 2-D array or matrix MxN times.
rand(*args)
rand
Return a matrix of random values with given shape.
randn(*args)
randn
Return a random matrix with data from the “standard normal” distribution.