csr_matrix.py#

Define the CSRmatrix class.

class openmdao.matrices.csr_matrix.CSRMatrix(submats)[source]

Bases: COOMatrix

Sparse matrix in Compressed Row Storage format.

Parameters:
submatsdict

Dictionary of sub-jacobian data keyed by (row_name, col_name).

__init__(submats)

Initialize all attributes.

dump(msginfo)

Dump the matrix to stdout.

Parameters:
msginfostr

Message info.

todense()

Return a dense version of the matrix.

Returns:
ndarray

Dense array representation of the matrix.

transpose()[source]

Transpose the matrix.

Returns:
csc_matrix

Transposed matrix.