pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.56k stars 1.07k forks source link

Failure on `main` testing xarray.cross #9327

Open TomNicholas opened 1 month ago

TomNicholas commented 1 month ago

What happened?

Failure on main testing xarray.cross

https://github.com/pydata/xarray/actions/runs/10298827771/job/28504816043#step:10:838

Possibly either a bug in apply_ufunc or an incorrect use of it.

What did you expect to happen?

No response

Minimal Complete Verifiable Example

No response

MVCE confirmation

Relevant log output

No response

Anything else we need to know?

No response

Environment

main

kmuehlbauer commented 1 month ago

It looks like this surfaced with new numpy 2.0.1 release in connection with dask 2024.8.0.

kmuehlbauer commented 1 month ago

So from what I can tell the align-path in below code should align a and b. But it returns multiple chunks instead of one chunk.

In the following elif-path there is special handling to rechunk. Hope this helps to figure out a solution.

https://github.com/pydata/xarray/blob/b22c4296f70ea9bf59cc1c8e6c34346489046338/xarray/core/computation.py#L1669-L1705