MCPcopy
hub / github.com/dask/dask / test_make_blockwise_sorted_slice

Function test_make_blockwise_sorted_slice

dask/array/tests/test_slicing.py:971–980  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

969
970
971def test_make_blockwise_sorted_slice():
972 x = da.arange(8, chunks=4)
973 index = np.array([6, 0, 4, 2, 7, 1, 5, 3])
974
975 a, b = make_block_sorted_slices(index, x.chunks)
976
977 index2 = np.array([0, 2, 4, 6, 1, 3, 5, 7])
978 index3 = np.array([3, 0, 2, 1, 7, 4, 6, 5])
979 np.testing.assert_array_equal(a, index2)
980 np.testing.assert_array_equal(b, index3)
981
982
983@pytest.mark.filterwarnings("ignore:Slicing:dask.array.core.PerformanceWarning")

Callers

nothing calls this directly

Calls 2

make_block_sorted_slicesFunction · 0.90
arangeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…