load_npz

sparse.load_npz(filename)[source]

Load a sparse matrix in numpy’s .npz format from disk. Note: This is not binary compatible with scipy’s save_npz() output. This binary format is not currently stable. Will only load files saved by this package.

Parameters:

filename (file-like object, string, or pathlib.Path) – The file to read. File-like objects must support the seek() and read() methods.

Returns:

The sparse matrix at path filename.

Return type:

SparseArray

Examples

See save_npz for usage examples.