()
| 3447 | |
| 3448 | |
| 3449 | def 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 | |
| 3464 | def test_vindex_nd(): |