(a, b)
| 4011 | y = da.ones((4, 4), chunks=(2, 2)) |
| 4012 | |
| 4013 | def f(a, b): |
| 4014 | assert isinstance(a, np.ndarray) |
| 4015 | assert isinstance(b, np.ndarray) |
| 4016 | |
| 4017 | assert a.shape == (2, 4, 4) |
| 4018 | assert b.shape == (4, 4) |
| 4019 | |
| 4020 | return (a + b).sum(axis=(1, 2)) |
| 4021 | |
| 4022 | z = da.blockwise(f, "i", x, "ijk", y, "jk", concatenate=True, dtype=x.dtype) |
| 4023 | assert_eq(z, np.ones(4) * 32) |