fips.Matrix.to_sparse#

Matrix.to_sparse(threshold=None)#

Return a copy with sparse internal storage.

Parameters:

threshold (float | None, optional) – If provided, values whose absolute value is strictly less than this threshold are zeroed out before sparsification, avoiding storage of floating-point noise as explicit non-zero entries. Default is None (no zeroing applied).

Returns:

New instance backed by a sparse DataFrame.

Return type:

Structure2D