Skip to content

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

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 15, 2025
Merged

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

merged 2 commits into from
Feb 15, 2025

Conversation

Andrej730
Copy link
Contributor

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)

@Andrej730
Copy link
Contributor Author

@jorenham Sorry, not sure who to ping - can you please take a look?

This comment has been minimized.

@Andrej730 Andrej730 changed the title Fix missing argument flags in typing TYP: fix missing argument flags in typing Feb 13, 2025
@jorenham jorenham changed the title TYP: fix missing argument flags in typing TYP: fix positional- and keyword-only parameters in astype and linalg Feb 13, 2025
@jorenham
Copy link
Member

Looks good! Could you squash your commits and prepend TYP: to the message(s)?

@charris charris added 41 - Static typing 09 - Backport-Candidate PRs tagged should be backported labels Feb 13, 2025
@jorenham jorenham self-requested a review February 14, 2025 20:51
@jorenham jorenham changed the title TYP: fix positional- and keyword-only parameters in astype and linalg TYP: fix positional- and keyword-only params in astype, cross and linalg Feb 15, 2025
@jorenham jorenham merged commit e20317a into numpy:main Feb 15, 2025
69 of 70 checks passed
@jorenham
Copy link
Member

Thanks Andrej!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants