-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
idxmin / idxmax is not parallel friendly #9425
Comments
Yes, this looks bad. The code should use xarray/xarray/core/computation.py Lines 2180 to 2187 in a8c9896
|
Hey, I absolutely missed this issue! I haven't yet had the pleasure to contribute to xarray - but do let me know if there's anything I can help with here @dcherian, I'd love to give a hand. |
Discussed in #9421
Originally posted by KBodolai September 2, 2024
Hi there! I have a question about the chunking behaviour when using idxmin / idxmax for a chunked array.
What is the expected behaviour for the chunks after we run
idxmin
over one of the dimensions? Naively I'd expect it to keep the chunks along the other dimensions, but that doesn't seem to be what happens: (Example below with time, x, y)Now when I look at the array, it looks something like this:
But after doing
idxmin
I get the outputs belowMy understanding is that it seems to be trying to keep the number of chunks. But oddly, when we do it for floats:
before and after doing the
idxmin
looks like this:Is this the expected behavour for this operation? I'm guessing the reshaping in the source code happens here, but I haven't been able to figure out how yet.
Thanks!
K.
The text was updated successfully, but these errors were encountered: