Closed
Description
Hi,
Awesome package.
Maybe I didn't understand all the details about the different parallel algorithms, but I am trying to use func="first"
with ,method="map-reduce"
as in the following code
import xarray as xr
import numpy as np
from flox.xarray import xarray_reduce
n = int(10000)
dsi = xr.Dataset(
dict(
x = ("obs",np.random.randn(n)),
y = ("obs",np.random.randint(1,20+1,n))
)
).chunk(obs=100)
expected = np.unique(dsi.y)
group_min = xarray_reduce(dsi,dsi.y,expected_groups=expected,func="first",method="map-reduce").load()
And it returns:
NotImplementedError: Aggregation 'first' is only implemented for dask arrays when method='blockwise'.
Is this the expected behavior?
Metadata
Metadata
Assignees
Labels
No labels