Repository navigation
Warn when explicit dims rename tuple-style DataArray coords - #11292
Merged
headtr1ck merged 4 commits intoSep 29, 2026
Merged
Conversation
7 tasks done
jsignell
approved these changes
Apr 10, 2026
jsignell
left a comment
Member
There was a problem hiding this comment.
This is a nice improvement. Thanks @officialasishkumar
headtr1ck
approved these changes
Apr 11, 2026
officialasishkumar
force-pushed
the
warn-11234-ignored-coord-names
branch
from
April 11, 2026 19:46
9877f6c to
d0cb208
Compare
jsignell
reviewed
Apr 13, 2026
Comment on lines
+437
to
+442
| expected = DataArray( | ||
| data, | ||
| coords={"x": [0, 1], "y": [-1, -2, -3]}, | ||
| dims=["x", "y"], | ||
| ) | ||
| assert_identical(expected, actual) |
Member
There was a problem hiding this comment.
It would make more sense to have this test instantiate the DataArray using a different syntax from actual.
Contributor
Author
There was a problem hiding this comment.
Updated this to build the expected result through Dataset instead of the same DataArray constructor path.
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
officialasishkumar
force-pushed
the
warn-11234-ignored-coord-names
branch
from
April 16, 2026 14:22
d0cb208 to
daa55e1
Compare
headtr1ck
enabled auto-merge (squash)
September 29, 2026 07:21
TomNicholas
added a commit
that referenced
this pull request
Sep 29, 2026
* Update whats-new for v2026.09.0 release - Rename the unreleased section to v2026.09.0 and add the release summary and contributor list - Move entries for #11348, #11292, #11290 and #11239 that were merged into older release sections - Add missing entries for #11552, #11521, #11486 and #11513 - Add missing PR links, fix the #11547 link and other markup - Fix the documented default of the use_bottleneck option - Add contributor names to the typos allow-list * Mention plot.lines and last Python 3.11 release in whats-new
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Warn when tuple-style coordinates are passed to
DataArray(...)together with explicitdims=and their tuple names are silently ignored. This adds a user-facing warning for that case, targeted constructor tests, and a whats-new entry.Checklist
whats-new.rstapi.rst(N/A - no new public API)AI Disclosure
Tools: Codex
Test plan
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python3 -m pytest -o addopts= /tmp/xarray-wt-11234/xarray/tests/test_dataarray.py -k constructor_tuple_coords -q