Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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