()
| 252 | |
| 253 | |
| 254 | def test_blockwise_literals(): |
| 255 | x = da.ones((10, 10), chunks=(5, 5)) |
| 256 | z = da.blockwise(add, "ij", x, "ij", 100, None, dtype=x.dtype) |
| 257 | assert_eq(z, x + 100) |
| 258 | |
| 259 | z = da.blockwise( |
| 260 | lambda x, y, z: x * y + z, "ij", 2, None, x, "ij", 100, None, dtype=x.dtype |
| 261 | ) |
| 262 | assert_eq(z, 2 * x + 100) |
| 263 | |
| 264 | z = da.blockwise(getitem, "ij", x, "ij", slice(None), None, dtype=x.dtype) |
| 265 | assert_eq(z, x) |
| 266 | |
| 267 | |
| 268 | def test_blockwise_1_in_shape_I(): |