(axis, edge_order)
| 805 | @pytest.mark.parametrize("axis", [0, -1, 1]) |
| 806 | @pytest.mark.parametrize("edge_order", [1, 2]) |
| 807 | def test_dask_gradient(axis, edge_order): |
| 808 | import dask.array as da |
| 809 | |
| 810 | array = np.array(np.random.randn(100, 5, 40)) |
| 811 | x = np.exp(np.linspace(0, 1, array.shape[axis])) |
| 812 | |
| 813 | darray = da.from_array(array, chunks=[(6, 30, 30, 20, 14), 5, 8]) |
| 814 | expected = gradient(array, x, axis=axis, edge_order=edge_order) |
| 815 | actual = gradient(darray, x, axis=axis, edge_order=edge_order) |
| 816 | |
| 817 | assert isinstance(actual, da.Array) |
| 818 | assert_array_equal(actual, expected) |
| 819 | |
| 820 | |
| 821 | @pytest.mark.parametrize("dim_num", [1, 2]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…