(xfail, func)
| 100 | |
| 101 | @pytest.mark.parametrize("func", [np.real, np.imag, np.transpose]) |
| 102 | def test_array_function_sparse(xfail, func): |
| 103 | sparse = pytest.importorskip("sparse") |
| 104 | if Version(sparse.__version__) == Version("0.15.2") and func in (np.real, np.imag): |
| 105 | xfail(reason="https://github.com/pydata/sparse/issues/682") |
| 106 | |
| 107 | x = da.random.default_rng().random((500, 500), chunks=(100, 100)) |
| 108 | x[x < 0.9] = 0 |
| 109 | y = x.map_blocks(sparse.COO) |
| 110 | assert_eq(func(x), func(y)) |
| 111 | |
| 112 | |
| 113 | def test_array_function_sparse_tensordot(): |
nothing calls this directly
no test coverage detected