cf.Data.sparse_array¶
-
Data.
sparse_array
¶ Return an independent
scipy
sparse array of the data.In-place changes to the returned sparse array do not affect the underlying dask array.
An
AttributeError
is raised if a sparse array representation is not available.Performance
sparse_array
causes all delayed operations to be computed. The returned sparse array is a deep copy of that returned by createdcompute
.New in version 3.16.0.
See also
- Returns
An independent
scipy
sparse array of the data.
Examples
>>> from scipy.sparse import issparse >>> issparse(d.sparse_array) True