cfdm.Data.sparse_array

Data.sparse_array

Return an independent scipy sparse array of the data.

An AttributeError is raised if a sparse array representation is not available.

New in version (cfdm): 1.11.0.0

See also

array

Returns

An independent scipy sparse array of the data.

Examples

>>> from scipy.sparse import issparse
>>> issparse(d.sparse_array)
True