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

Function test_vindex_basic

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

Source from the content-addressed store, hash-verified

3447
3448
3449def test_vindex_basic():
3450 x = np.arange(56).reshape((7, 8))
3451 d = da.from_array(x, chunks=(3, 4))
3452
3453 # cases where basic and advanced indexing coincide
3454 result = d.vindex[0]
3455 assert_eq(result, x[0])
3456
3457 result = d.vindex[0, 1]
3458 assert_eq(result, x[0, 1])
3459
3460 result = d.vindex[[0, 1], ::-1] # slices last
3461 assert_eq(result, x[:2, ::-1])
3462
3463
3464def test_vindex_nd():

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
reshapeMethod · 0.80
arangeMethod · 0.45

Tested by

no test coverage detected