()
| 482 | |
| 483 | @pytest.mark.xfail(da._array_expr_enabled(), reason="__array_function__ needed") |
| 484 | def test_map_overlap_multiarray_variadic(): |
| 485 | # Test overlapping row slices from 3D arrays |
| 486 | xs = [ |
| 487 | # Dim 0 will unify to chunks of size 4 for all: |
| 488 | da.ones((12, 1, 1), chunks=((12,), 1, 1)), |
| 489 | da.ones((12, 8, 1), chunks=((8, 4), 8, 1)), |
| 490 | da.ones((12, 8, 4), chunks=((4, 8), 8, 4)), |
| 491 | ] |
| 492 | |
| 493 | def func(*args): |
| 494 | return np.array([sum(x.size for x in args)]) |
| 495 | |
| 496 | x = da.map_overlap( |
| 497 | func, |
| 498 | *xs, |
| 499 | chunks=(1,), |
| 500 | depth=1, |
| 501 | trim=False, |
| 502 | drop_axis=[1, 2], |
| 503 | boundary="reflect", |
| 504 | ) |
| 505 | |
| 506 | # Each func call should get 4 rows from each array padded by 1 in each dimension |
| 507 | size_per_slice = sum(np.pad(x[:4], 1, mode="constant").size for x in xs) |
| 508 | assert x.shape == (3,) |
| 509 | assert all(x.compute() == size_per_slice) |
| 510 | |
| 511 | |
| 512 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…