SparseArray
- class sparse.SparseArray(shape, fill_value=None)[source]
An abstract base class for all the sparse array classes.
- dtype
The data type of this array.
- Type:
- fill_value
The fill value of this array.
- Type:
scalar
Attributes
The ratio of nonzero to all elements in this array.
The number of dimensions of this array.
The number of nonzero elements in this array.
The number of all elements (including zeros) in this array.
Methods
SparseArray.asformat
(format)Convert this sparse array to a given format.
Convert this
SparseArray
array to a densenumpy.ndarray
.