MCPcopy Create free account
hub / github.com/dask/dask / test_index_with_bool_dask_array

Function test_index_with_bool_dask_array

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

Source from the content-addressed store, hash-verified

723
724
725def test_index_with_bool_dask_array():
726 x = np.arange(36).reshape((6, 6))
727 d = da.from_array(x, chunks=(3, 3))
728 ind = np.asarray([True, True, False, True, False, False], dtype=bool)
729 ind = da.from_array(ind, chunks=2)
730 for index in [ind, (slice(1, 9, 2), ind), (ind, slice(2, 8, 1))]:
731 x_index = dask.compute(index)[0]
732 assert_eq(x[x_index], d[index])
733
734
735def test_index_with_bool_dask_array_2():

Callers

nothing calls this directly

Calls 4

assert_eqFunction · 0.90
reshapeMethod · 0.80
arangeMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected