Skip to content

TYP: fix positional- and keyword-only params in astype, cross and linalg #28348

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

Merged
merged 2 commits into from
Feb 17, 2025

Conversation

charris
Copy link
Member

@charris charris commented Feb 17, 2025

Backport of #28327.

Example:

import numpy as np
lst = np.eye(3)
# No typing issues but on runtime:
# TypeError: astype() got some positional-only arguments passed as keyword arguments: 'x, dtype'
np.astype(x=lst, dtype=np.float64)

@charris charris added 08 - Backport Used to tag backport PRs 41 - Static typing labels Feb 17, 2025
@charris charris added this to the 2.2.4 release milestone Feb 17, 2025
@charris charris merged commit 22ef020 into numpy:maintenance/2.2.x Feb 17, 2025
69 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 - Backport Used to tag backport PRs 41 - Static typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants