COO.todense¶
-
COO.
todense
()[source]¶ Convert this
COO
array to a densenumpy.ndarray
. Note that this may take a large amount of memory if theCOO
object’sshape
is large.- Returns
The converted dense array.
- Return type
See also
DOK.todense()
Equivalent
DOK
array method.scipy.sparse.coo_matrix.todense()
Equivalent Scipy method.
Examples
>>> x = np.random.randint(100, size=(7, 3)) >>> s = COO.from_numpy(x) >>> x2 = s.todense() >>> np.array_equal(x, x2) True