asCOO
Convert the input to sparse.COO
. Passes through sparse.COO
objects as-is.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Union[SparseArray, spmatrix, ndarray]
|
The input array to convert. |
required |
name
|
str
|
The name of the operation to use in the exception. |
'asCOO'
|
check
|
bool_
|
Whether to check for a dense input. |
True
|
Returns:
Type | Description |
---|---|
COO
|
The converted |
Raises:
Type | Description |
---|---|
ValueError
|
If |
Source code in sparse/numba_backend/_coo/common.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|