Skip to content
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

Fix missing coordinate attributes after apply_ufunc operations #10083

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ Bug fixes
Haacker <https://github.com/j-haacker>`_.
- Fix ``isel`` for multi-coordinate Xarray indexes (:issue:`10063`, :pull:`10066`).
By `Benoit Bovy <https://github.com/benbovy>`_.

- Always merge coordinates with "no_conflicts" to fix missing attributes after apply_ufunc
operations (:issue:`9317`). By `Jasper de Jong <https://github.com/JdeJong96>`_.

Documentation
~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions xarray/core/computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def apply_dataarray_vfunc(
first_obj = _first_of_type(args, DataArray)
name = first_obj.name
result_coords, result_indexes = build_output_coords_and_indexes(
args, signature, exclude_dims, combine_attrs=keep_attrs
args, signature, exclude_dims, combine_attrs="no_conflicts"
)

data_vars = [getattr(a, "variable", a) for a in args]
Expand Down Expand Up @@ -522,7 +522,7 @@ def apply_dataset_vfunc(
)

list_of_coords, list_of_indexes = build_output_coords_and_indexes(
args, signature, exclude_dims, combine_attrs=keep_attrs
args, signature, exclude_dims, combine_attrs="no_conflicts"
)
args = tuple(getattr(arg, "data_vars", arg) for arg in args)

Expand Down
6 changes: 6 additions & 0 deletions xarray/tests/test_computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,12 @@
)


def test_keep_coordattrs() -> None:
a = xr.DataArray([0, 1], [("x", [0, 1], {"a": "b"})])
actual = apply_ufunc(operator.abs, a)
assert actual.x.attrs == a.x.attrs


def test_keep_attrs() -> None:
def add(a, b, keep_attrs):
if keep_attrs:
Expand Down Expand Up @@ -955,7 +961,7 @@
data=[0, 3],
coords={"x": ("x", [0, 1], dim_attrs), "u": ("x", [0, 1], coord_attrs)},
)
actual = apply_ufunc(lambda *args: sum(args), a, b, c, keep_attrs=strategy)

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_keep_attrs_strategies_dataarray_variables[default-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_keep_attrs_strategies_dataarray_variables[default-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_keep_attrs_strategies_dataarray_variables[False-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_keep_attrs_strategies_dataarray_variables[False-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_keep_attrs_strategies_dataarray_variables[True-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_keep_attrs_strategies_dataarray_variables[True-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_keep_attrs_strategies_dataarray_variables[override-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_keep_attrs_strategies_dataarray_variables[override-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_keep_attrs_strategies_dataarray_variables[drop-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.13

test_keep_attrs_strategies_dataarray_variables[default-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.13

test_keep_attrs_strategies_dataarray_variables[default-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.13

test_keep_attrs_strategies_dataarray_variables[False-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.13

test_keep_attrs_strategies_dataarray_variables[False-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.13

test_keep_attrs_strategies_dataarray_variables[True-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.13

test_keep_attrs_strategies_dataarray_variables[True-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.13

test_keep_attrs_strategies_dataarray_variables[override-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.13

test_keep_attrs_strategies_dataarray_variables[override-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.13

test_keep_attrs_strategies_dataarray_variables[drop-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-dask

test_keep_attrs_strategies_dataarray_variables[default-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-dask

test_keep_attrs_strategies_dataarray_variables[default-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-dask

test_keep_attrs_strategies_dataarray_variables[False-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-dask

test_keep_attrs_strategies_dataarray_variables[False-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-dask

test_keep_attrs_strategies_dataarray_variables[True-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-dask

test_keep_attrs_strategies_dataarray_variables[True-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-dask

test_keep_attrs_strategies_dataarray_variables[override-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-dask

test_keep_attrs_strategies_dataarray_variables[override-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-dask

test_keep_attrs_strategies_dataarray_variables[drop-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_keep_attrs_strategies_dataarray_variables[default-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_keep_attrs_strategies_dataarray_variables[default-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_keep_attrs_strategies_dataarray_variables[False-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_keep_attrs_strategies_dataarray_variables[False-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_keep_attrs_strategies_dataarray_variables[True-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_keep_attrs_strategies_dataarray_variables[True-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_keep_attrs_strategies_dataarray_variables[override-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_keep_attrs_strategies_dataarray_variables[override-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_keep_attrs_strategies_dataarray_variables[drop-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13 all-but-numba

test_keep_attrs_strategies_dataarray_variables[default-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13 all-but-numba

test_keep_attrs_strategies_dataarray_variables[default-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13 all-but-numba

test_keep_attrs_strategies_dataarray_variables[False-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13 all-but-numba

test_keep_attrs_strategies_dataarray_variables[False-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13 all-but-numba

test_keep_attrs_strategies_dataarray_variables[True-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13 all-but-numba

test_keep_attrs_strategies_dataarray_variables[True-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13 all-but-numba

test_keep_attrs_strategies_dataarray_variables[override-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13 all-but-numba

test_keep_attrs_strategies_dataarray_variables[override-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13 all-but-numba

test_keep_attrs_strategies_dataarray_variables[drop-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[default-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[default-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[False-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[False-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[True-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[True-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[override-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[override-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[drop-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_keep_attrs_strategies_dataarray_variables[drop-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_keep_attrs_strategies_dataarray_variables[default-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_keep_attrs_strategies_dataarray_variables[default-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_keep_attrs_strategies_dataarray_variables[False-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_keep_attrs_strategies_dataarray_variables[False-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_keep_attrs_strategies_dataarray_variables[True-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_keep_attrs_strategies_dataarray_variables[True-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_keep_attrs_strategies_dataarray_variables[override-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_keep_attrs_strategies_dataarray_variables[override-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_keep_attrs_strategies_dataarray_variables[drop-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13

test_keep_attrs_strategies_dataarray_variables[default-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13

test_keep_attrs_strategies_dataarray_variables[default-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13

test_keep_attrs_strategies_dataarray_variables[False-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13

test_keep_attrs_strategies_dataarray_variables[False-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13

test_keep_attrs_strategies_dataarray_variables[True-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13

test_keep_attrs_strategies_dataarray_variables[True-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13

test_keep_attrs_strategies_dataarray_variables[override-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13

test_keep_attrs_strategies_dataarray_variables[override-coord] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

Check failure on line 964 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.13

test_keep_attrs_strategies_dataarray_variables[drop-dim] xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'a': 1} with {'a': 2}

assert_identical(actual, expected)

Expand Down Expand Up @@ -2211,7 +2217,7 @@
y["a"].attrs = {"attr": "y_coord"}

# 3 DataArrays, takes attrs from x
actual = xr.where(cond, x, y, keep_attrs=True)

Check failure on line 2220 in xarray/tests/test_computation.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 bare-minimum

test_where_attrs xarray.core.merge.MergeError: combine_attrs='no_conflicts', but some values are not the same. Merging {'attr': 'cond_coord'} with {'attr': 'x_coord'}
expected = xr.DataArray([1, 0], coords={"a": [0, 1]}, attrs={"attr": "x_da"})
expected["a"].attrs = {"attr": "x_coord"}
assert_identical(expected, actual)
Expand Down
Loading