Converting COO
objects to other FormatsΒΆ
COO
arrays can be converted to numpy.ndarray
objects,
or to some scipy.sparse.spmatrix
subclasses via the following
methods:
COO.todense
: Converts to anumpy.ndarray
unconditionally.COO.maybe_densify
: Converts to anumpy.ndarray
based on- certain constraints.
COO.to_scipy_sparse
: Converts to ascipy.sparse.coo_matrix
if- the array is two dimensional.
COO.tocsr
: Converts to ascipy.sparse.csr_matrix
if- the array is two dimensional.
COO.tocsc
: Converts to ascipy.sparse.csc_matrix
if- the array is two dimensional.