Routines#

diag(values[, offset, shape, dtype, format])

Create a sparse diagonal matrix of specified values and offset.

zeros(shape[, dtype, symmetry, format])

Create an empty sparse matrix of specified shape and dtype.

eye(shape[, offset, dtype, format])

Create a sparse identity matrix of specified shape and dtype.

load_npz(file)

Loads a sparse matrix from a npz archive.

random(shape[, density, dtype, format])

Create a sparse random matrix of specified shape and density.