COO.todense
- COO.todense()[source]
Convert this
COOarray to a densenumpy.ndarray. Note that this may take a large amount of memory if theCOOobject’sshapeis large.- Returns:
The converted dense array.
- Return type:
See also
DOK.todenseEquivalent
DOKarray method.scipy.sparse.coo_matrix.todenseEquivalent 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