()
| 761 | |
| 762 | @pytest.mark.xfail(da._array_expr_enabled(), reason="push needed") |
| 763 | def test_push(): |
| 764 | bottleneck = pytest.importorskip("bottleneck") |
| 765 | |
| 766 | array = np.array([np.nan, 1, 2, 3, np.nan, np.nan, np.nan, np.nan, 4, 5, np.nan, 6]) |
| 767 | |
| 768 | for n in [None, 1, 2, 3, 4, 5, 11]: |
| 769 | expected = bottleneck.push(array, axis=0, n=n) |
| 770 | for c in range(1, 11): |
| 771 | actual = push(from_array(array, chunks=c), axis=0, n=n) |
| 772 | np.testing.assert_equal(actual, expected) |
| 773 | |
| 774 | # some chunks of size-1 with NaN |
| 775 | actual = push(from_array(array, chunks=(1, 2, 3, 2, 2, 1, 1)), axis=0, n=n) |
| 776 | np.testing.assert_equal(actual, expected) |
| 777 | |
| 778 | |
| 779 | @pytest.mark.parametrize("boundary", ["reflect", "periodic", "nearest", "none"]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…