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

Function test_slicing_with_ndarray

dask/array/tests/test_array_core.py:1999–2006  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1997
1998
1999def test_slicing_with_ndarray():
2000 x = np.arange(64).reshape((8, 8))
2001 d = da.from_array(x, chunks=((4, 4)))
2002
2003 assert_eq(d[np.arange(8)], x)
2004 assert_eq(d[np.ones(8, dtype=bool)], x)
2005 assert_eq(d[np.array([1])], x[[1]])
2006 assert_eq(d[np.array([True, False, True] + [False] * 5)], x[[0, 2]])
2007
2008
2009def test_slicing_flexible_type():

Callers

nothing calls this directly

Calls 4

assert_eqFunction · 0.90
reshapeMethod · 0.80
arangeMethod · 0.45
onesMethod · 0.45

Tested by

no test coverage detected