(array, idx, axis=0)
| 157 | |
| 158 | |
| 159 | def sparse_take(array, idx, axis=0): |
| 160 | if axis not in {0, 1}: # pragma: no cover |
| 161 | raise ValueError("Sparse matrices can only be concatenated along axis 0 or 1") |
| 162 | indexer = (slice(None), idx) if axis else (idx, slice(None)) |
| 163 | return array[indexer] |
| 164 | |
| 165 | |
| 166 | @tensordot_lookup.register_lazy("cupyx") |
nothing calls this directly
no outgoing calls
no test coverage detected