# SparseArray¶

class sparse.SparseArray(shape)[source]

An abstract base class for all the sparse array classes.

dtype

numpy.dtype – The data type of this array.

Attributes

 SparseArray.density The ratio of nonzero to all elements in this array. SparseArray.ndim The number of dimensions of this array. SparseArray.nnz The number of nonzero elements in this array. SparseArray.size The number of all elements (including zeros) in this array.