Repository navigation
Fix align(join="override") copying index attrs and encoding across objects - #11990
Open
pierceluu10 wants to merge 2 commits into
Open
pierceluu10 wants to merge 2 commits into
pierceluu10 wants to merge 2 commits into
Conversation
…ide" Aligner.override_indexes copied the first object's index variables into every other object, so DataArrays got the first object's attrs and encoding and Datasets got both merged. Take attrs and encoding from each object's own matching index variable instead, as join="inner" or "left" do. Closes pydata#6860 Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
This branch has not been deployed
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
Problem
With
join="override",aligncopied the first object's index variables into every other object, including theirattrsandencoding. The result:Fix
Each object now keeps the
attrsandencodingof its own index variable, which matches whatjoin="inner"already does. Only the index values are overridden.copy=Trueandcopy=Falsebehave as before.Tests
Extended
test_align_index_var_attrsto cover:Checklist
whats-new.rstAI Disclosure
Tools: Claude Code (Claude Opus 5.5). Prompt: asked to fix Align with join='override' may update index coordinate metadata #6860 using the approach headtr1ck described in the issue, and to extend the existing test