scipy.sparse.

spmatrix#

class scipy.sparse.spmatrix[源代码][源代码]#

此类为所有稀疏矩阵类提供了一个基类。

它不能被实例化。大部分工作由子类提供。

属性:
shape

矩阵的形状

方法

__mul__(other)

asfptype()

将矩阵向上转换为浮点格式(如果需要)

getH()

返回此矩阵的厄米转置。

get_shape()

获取矩阵的形状

getcol(j)

返回矩阵的第 j 列的副本,作为一个 (m x 1) 的稀疏矩阵(列向量)。

getformat()

矩阵存储格式

getmaxprint()

打印时显示的最大元素数量。

getnnz([axis])

存储值的数量,包括显式零。

getrow(i)

返回矩阵第 i 行的副本,作为一个 (1 x n) 的稀疏矩阵(行向量)。

set_shape(shape)

就地设置矩阵的形状