xorbits.numpy.mat#
- xorbits.numpy.mat(data, dtype=None)#
Interpret the input as a matrix.
Unlike matrix, asmatrix does not make a copy if the input is already a matrix or an ndarray. Equivalent to
matrix(data, copy=False)
.- 参数
data (array_like) – Input data.
dtype (data-type) – Data-type of the output matrix.
- 返回
mat – data interpreted as a matrix.
- 返回类型
matrix
实际案例
>>> x = np.array([[1, 2], [3, 4]])
>>> m = np.asmatrix(x)
>>> x[0,0] = 5
>>> m matrix([[5, 2], [3, 4]])
警告
This method has not been implemented yet. Xorbits will try to execute it with numpy.
This docstring was copied from numpy.