discretize.utils.speye#

discretize.utils.speye(n)[source]#

Generate sparse identity matrix.

Parameters
nint

The dimensions of the sparse identity matrix.

Returns
(n, n) scipy.sparse.csr_matrix

The sparse identity matrix.

Galleries and Tutorials using discretize.utils.speye#

Operators: Cahn Hilliard

Operators: Cahn Hilliard

Operators: Cahn Hilliard