|
1 | | -# Matrix library (``numpy.matlib``) |
| 1 | +# 矩阵库 (``numpy.matlib``) |
2 | 2 |
|
3 | | -This module contains all functions in the [``numpy``](index.html#module-numpy) namespace, with |
4 | | -the following replacement functions that return [``matrices``](https://numpy.org/devdocs/reference/generated/numpy.matrix.html#numpy.matrix) instead of [``ndarrays``](https://numpy.org/devdocs/reference/generated/numpy.ndarray.html#numpy.ndarray). |
| 3 | +该模块包含 [``numpy``](index.html#module-numpy) 命名空间中的所有函数, 以下返回 [``矩阵``](https://numpy.org/devdocs/reference/generated/numpy.matrix.html#numpy.matrix) 而不是 [``ndarrays``](https://numpy.org/devdocs/reference/generated/numpy.ndarray.html#numpy.ndarray)的替换函数。 |
5 | 4 |
|
6 | | -Functions that are also in the numpy namespace and return matrices |
| 5 | +也在numpy命名空间中的函数并返回矩阵 |
7 | 6 |
|
8 | 7 | method | description |
9 | 8 | ---|--- |
10 | | -[mat](https://numpy.org/devdocs/reference/generated/numpy.mat.html#numpy.mat)(data[, dtype]) | Interpret the input as a [matrix](https://numpy.org/devdocs/reference/generated/numpy.matrix.html#numpy.matrix). |
11 | | -[matrix](https://numpy.org/devdocs/reference/generated/numpy.matrix.html#numpy.matrix)(data[, dtype, copy]) | Note: It is no longer recommended to use this class, even for linear |
12 | | -[asmatrix](https://numpy.org/devdocs/reference/generated/numpy.asmatrix.html#numpy.asmatrix)(data[, dtype]) | Interpret the input as a matrix. |
13 | | -[bmat](https://numpy.org/devdocs/reference/generated/numpy.bmat.html#numpy.bmat)(obj[, ldict, gdict]) | Build a matrix object from a string, nested sequence, or array. |
| 9 | +[mat](https://numpy.org/devdocs/reference/generated/numpy.mat.html#numpy.mat)(data[, dtype]) | 将输入解释为 [矩阵](https://numpy.org/devdocs/reference/generated/numpy.matrix.html#numpy.matrix). |
| 10 | +[matrix](https://numpy.org/devdocs/reference/generated/numpy.matrix.html#numpy.matrix)(data[, dtype, copy]) | 注意:不再建议使用此类,即使对于线性 |
| 11 | +[asmatrix](https://numpy.org/devdocs/reference/generated/numpy.asmatrix.html#numpy.asmatrix)(data[, dtype]) | 将输入解释为矩阵。 |
| 12 | +[bmat](https://numpy.org/devdocs/reference/generated/numpy.bmat.html#numpy.bmat)(obj[, ldict, gdict]) | 从字符串,嵌套序列或数组构建矩阵对象。 |
14 | 13 |
|
15 | | -Replacement functions in [``matlib``](#module-numpy.matlib) |
| 14 | + [``matlib``](#module-numpy.matlib)的替换函数 |
16 | 15 |
|
17 | 16 | method | description |
18 | 17 | ---|--- |
19 | | -[empty](https://numpy.org/devdocs/reference/generated/numpy.matlib.empty.html#numpy.matlib.empty)(shape[, dtype, order]) | Return a new matrix of given shape and type, without initializing entries. |
20 | | -[zeros](https://numpy.org/devdocs/reference/generated/numpy.matlib.zeros.html#numpy.matlib.zeros)(shape[, dtype, order]) | Return a matrix of given shape and type, filled with zeros. |
21 | | -[ones](https://numpy.org/devdocs/reference/generated/numpy.matlib.ones.html#numpy.matlib.ones)(shape[, dtype, order]) | Matrix of ones. |
22 | | -[eye](https://numpy.org/devdocs/reference/generated/numpy.matlib.eye.html#numpy.matlib.eye)(n[, M, k, dtype, order]) | Return a matrix with ones on the diagonal and zeros elsewhere. |
23 | | -[identity](https://numpy.org/devdocs/reference/generated/numpy.matlib.identity.html#numpy.matlib.identity)(n[, dtype]) | Returns the square identity matrix of given size. |
24 | | -[repmat](https://numpy.org/devdocs/reference/generated/numpy.matlib.repmat.html#numpy.matlib.repmat)(a, m, n) | Repeat a 0-D to 2-D array or matrix MxN times. |
25 | | -[rand](https://numpy.org/devdocs/reference/generated/numpy.matlib.rand.html#numpy.matlib.rand)(\*args) | Return a matrix of random values with given shape. |
26 | | -[randn](https://numpy.org/devdocs/reference/generated/numpy.matlib.randn.html#numpy.matlib.randn)(\*args) | Return a random matrix with data from the “standard normal” distribution. |
| 18 | +[empty](https://numpy.org/devdocs/reference/generated/numpy.matlib.empty.html#numpy.matlib.empty)(shape[, dtype, order]) | 返回给定形状和类型的新矩阵,而无需初始化条目。 |
| 19 | +[zeros](https://numpy.org/devdocs/reference/generated/numpy.matlib.zeros.html#numpy.matlib.zeros)(shape[, dtype, order]) | 返回给定形状和类型的矩阵,并用零填充。 |
| 20 | +[ones](https://numpy.org/devdocs/reference/generated/numpy.matlib.ones.html#numpy.matlib.ones)(shape[, dtype, order]) | 一个矩阵。 |
| 21 | +[eye](https://numpy.org/devdocs/reference/generated/numpy.matlib.eye.html#numpy.matlib.eye)(n[, M, k, dtype, order]) | 返回一个矩阵,在对角线上有一个,在其他地方为零。 |
| 22 | +[identity](https://numpy.org/devdocs/reference/generated/numpy.matlib.identity.html#numpy.matlib.identity)(n[, dtype]) | 返回给定大小的平方单位矩阵。 |
| 23 | +[repmat](https://numpy.org/devdocs/reference/generated/numpy.matlib.repmat.html#numpy.matlib.repmat)(a, m, n) | 重复从0D到2D数组或矩阵MxN次。 |
| 24 | +[rand](https://numpy.org/devdocs/reference/generated/numpy.matlib.rand.html#numpy.matlib.rand)(\*args) |返回具有给定形状的随机值矩阵。 |
| 25 | +[randn](https://numpy.org/devdocs/reference/generated/numpy.matlib.randn.html#numpy.matlib.randn)(\*args) | 返回一个随机矩阵,其中包含来自“标准正态”分布的数据。 |
0 commit comments