asCOO
- sparse.asCOO(x, name='asCOO', check=True)[source]
Convert the input to
COO
. Passes throughCOO
objects as-is.- Parameters:
x (Union[SparseArray, scipy.sparse.spmatrix, numpy.ndarray]) – The input array to convert.
name (str, optional) – The name of the operation to use in the exception.
check (bool, optional) – Whether to check for a dense input.
- Returns:
The converted
COO
array.- Return type:
- Raises:
ValueError – If
check
is true and a dense input is supplied.