()
| 12 | |
| 13 | |
| 14 | def test_sparse_hstack_vstack_csr(): |
| 15 | pytest.importorskip("cupyx") |
| 16 | x = cupy.arange(24, dtype=cupy.float32).reshape(4, 6) |
| 17 | |
| 18 | sp = da.from_array(x, chunks=(2, 3), asarray=False, fancy=False) |
| 19 | sp = sp.map_blocks(cupyx.scipy.sparse.csr_matrix, dtype=cupy.float32) |
| 20 | |
| 21 | y = sp.compute() |
| 22 | |
| 23 | assert cupyx.scipy.sparse.isspmatrix(y) |
| 24 | assert_eq(x, y.todense()) |
| 25 | |
| 26 | |
| 27 | @pytest.mark.parametrize("axis", [0, 1]) |
nothing calls this directly
no test coverage detected