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

Function test_point_slicing

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

Source from the content-addressed store, hash-verified

3372
3373
3374def test_point_slicing():
3375 x = np.arange(56).reshape((7, 8))
3376 d = da.from_array(x, chunks=(3, 4))
3377
3378 result = d.vindex[[1, 2, 5, 5], [3, 1, 6, 1]]
3379 assert_eq(result, x[[1, 2, 5, 5], [3, 1, 6, 1]])
3380
3381 result = d.vindex[[0, 1, 6, 0], [0, 1, 0, 7]]
3382 assert_eq(result, x[[0, 1, 6, 0], [0, 1, 0, 7]])
3383 assert same_keys(result, d.vindex[[0, 1, 6, 0], [0, 1, 0, 7]])
3384
3385
3386def test_point_slicing_with_full_slice():

Callers

nothing calls this directly

Calls 4

assert_eqFunction · 0.90
same_keysFunction · 0.90
reshapeMethod · 0.80
arangeMethod · 0.45

Tested by

no test coverage detected