take
Returns elements of an array along an axis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
SparseArray
|
Input array. |
required |
indices
|
ndarray
|
Array indices. The array must be one-dimensional and have an integer data type. |
required |
axis
|
int
|
Axis over which to select values. If |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
COO
|
A COO array with requested indices. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the input array isn't and can't be converted to COO format. |
Source code in sparse/numba_backend/_coo/common.py
1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 | |