(L, axis=0)
| 175 | ) from e |
| 176 | |
| 177 | def _concat_cupy_sparse(L, axis=0): |
| 178 | if axis == 0: |
| 179 | return vstack(L) |
| 180 | elif axis == 1: |
| 181 | return hstack(L) |
| 182 | else: |
| 183 | msg = ( |
| 184 | "Can only concatenate cupy sparse matrices for axis in " |
| 185 | "{0, 1}. Got %s" % axis |
| 186 | ) |
| 187 | raise ValueError(msg) |
| 188 | |
| 189 | concatenate_lookup.register(spmatrix, _concat_cupy_sparse) |
| 190 | tensordot_lookup.register(spmatrix, _tensordot_scipy_sparse) |