()
| 1997 | |
| 1998 | |
| 1999 | def 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 | |
| 2009 | def test_slicing_flexible_type(): |