Repository navigation
Name the data variable in apply_ufunc errors on Datasets - #11832
Merged
Merged
Conversation
Closes pydata#2078 Co-authored-by: Claude <noreply@anthropic.com>
dcherian
approved these changes
Oct 30, 2026
…e-name-note Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
dcherian
enabled auto-merge (squash)
October 31, 2026 19:00
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
When
apply_ufuncfails on a Dataset, the error comes from code that only sees aVariable, so it can't say which data variable broke. As discussed in #2078, threading the name throughbroadcast_compat_dataandapply_variable_ufuncwould add a lot of plumbing for an error message. Instead,apply_dict_of_variables_vfuncadds a note to the exception, the same pattern already used inconventions.pyandbackends/common.py:The exception type and message are unchanged, so existing
except/match=code keeps working. Errors raised by the user's function get the same note.Checklist
whats-new.rstAI Disclosure
Tools: Claude Code (Claude Opus 5.5)
[This is Claude Code on behalf of Abderrahmane El Aoudi]