You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Multiplication of two sparse-backed xr.DataArray with differently-ordered coords on matching dimensions produces incorrect results, silently.
To Reproduce
Consider two CSV files.
These are based on an in-use example, but I've anonymized the data for simplicity.
Focus on the coordinates (a0, b2, c3, c3, d0, e0); the values in the files are, respectively, about 211 and 50, giving a product of about 10556.
Note that the "b" dimension labels appear in a different order in the two files.
Describe the bug
Multiplication of two sparse-backed xr.DataArray with differently-ordered coords on matching dimensions produces incorrect results, silently.
To Reproduce
Consider two CSV files.
a.csv
b.csv
and the code:
When run with
SPARSE = False
, the final line prints:When run with
SPARSE = True
, the result is instead, and incorrectly:array(nan)
.The second-to-last line shows that the result contains only the labels 'b1' and 'b2', but all the values for b='b2' are NaN.
Expected behavior
Correct results, or at least an exception or error message indicating that the results will not be correct.
System
Ubuntu 20.04
xarray.show_versions()
The text was updated successfully, but these errors were encountered: