I am converting code to use dask arrays instead of numpy arrays.
I have dask version 0.19.4 installed.
I have an array that has been replaced by an equivalent dask array:
# this used to be a numpy array, created like so:
# da = np.zeros((total_months,))
da = dask.array.zeros((total_months,), chunks=(-1))
When I hit the following line of code (which previously worked when the array was a numpy array), I get an item assignment error:
for k in range(total_months):
da[k] = awc - s0
NotImplementedError: Item assignment with <class 'int'> not supported
awc
and s0
are both float scalars in the above.
My understanding is that normal numpy-style slicing and array element indexing works as expected with dask, but that isn't happening here. Where might I have gone astray?