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