I have been trying to figure out how to execute functions on slices of a dask array. For example if I create the following dask array:
import numpy as np
import dask.array as da
x = da.random.normal(10, 0.1, size=(200, 4),chunks=(100, 100))
and define the function:
#test function
def test(x,y,z=4):
return x*y+z, z*y
executing
a,b = test(x[:,0],x[:,1])
a.compute()
b.compute()
works as expected, but if I try and assign these results back to x, the function fails:
x[:,0],x[:,1] = test(x[:,0],x[:,1])
throwing an NotImplementedError: Item assignment with not supported Is there a way I can work around this to do this kindve an operation? Thank You,