COO.size¶
-
COO.size¶ The number of all elements (including zeros) in this array.
Returns: The number of elements. Return type: int See also
numpy.ndarray.size- Numpy equivalent property.
Examples
>>> from sparse import COO >>> import numpy as np >>> x = np.zeros((10, 10)) >>> s = COO.from_numpy(x) >>> s.size 100