Registry Mirror
Skip to content

Conversation

@headtr1ck

@headtr1ck headtr1ck commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds type hints to __array_ufunc__ of Variable, DataArray and Dataset, matching the __array_ufunc__ protocols of NumPy's new ufunc stubs (numpy/_core/umath.pyi, NumPy 2.6).

Checklist

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Claude Code

[This is Claude Code on behalf of Michael Niklas]

🤖 Generated with Claude Code

headtr1ck and others added 3 commits October 4, 2026 23:48
Add overloads that match the __array_ufunc__ protocols of NumPy's ufunc
stubs (numpy/_core/umath.pyi), so that type checkers can infer the result
of e.g. np.exp(da) or np.add(da, ds).

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
@headtr1ck headtr1ck added the plan to merge Final call for comments label Oct 5, 2026
@headtr1ck
headtr1ck merged commit 86222e0 into pydata:main Oct 6, 2026
57 of 59 checks passed
@headtr1ck
headtr1ck deleted the typing-array-ufunc branch October 7, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan to merge Final call for comments topic-typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant