MCPcopy
hub / github.com/dask/dask / test_push

Function test_push

dask/array/tests/test_overlap.py:763–776  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

761
762@pytest.mark.xfail(da._array_expr_enabled(), reason="push needed")
763def 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"])

Callers

nothing calls this directly

Calls 2

pushFunction · 0.90
from_arrayFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…