I'm trying to change the slice in Dask array row-wise and col-wise way:
from dask import array as da
A = da.from_array(np.zeros((3,3)))
A[[0,1,2], 0] = [1,2,3]
A.compute()
And I've got:
array([[1., 0., 0.],
[2., 0., 0.],
[3., 0., 0.]])
But in row-wise way:
A = da.from_array(np.zeros((3,3)))
A[0,[0,1,2]] = [1,2,3]
A.compute()
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
Do You where the problem is? Or any other method to do this kind of assignment?