COO
DOK.
from_coo
Get a DOK array from a COO array.
DOK
x (COO) – The array to convert.
The equivalent DOK array.
Examples
>>> from sparse import COO >>> s = COO.from_numpy(np.eye(4)) >>> s2 = DOK.from_coo(s) >>> s2 <DOK: shape=(4, 4), dtype=float64, nnz=4, fill_value=0.0>