COOMatrix

class odl.util.sparse.COOMatrix(data, index, shape)[source]

Bases: object

Custom coo matrix representation for creating product space operators.

The columns, rows and data are stored in separate lists such that A[i[k], j[k]] = data[k].

Note that, the class is only used as a container and does not provide any matrix operations. Further, no checks are performed on the data thus duplicate and out-of-order indices are allowed and the user is responsible for ensuring the correct shape of the matrix.

Attributes:
col

Return the column indices of the matrix.

data

Return the data of the matrix.

row

Return the row indices of the matrix.

shape

Return the shape of the matrix.

__init__(data, index, shape)[source]