Skip to content

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

Merged
jorenham merged 2 commits intonumpy:mainfrom
Andrej730:fix_typing_arguments
Feb 15, 2025
Merged

TYP: fix positional- and keyword-only params in astype, cross and linalg#28327
jorenham merged 2 commits intonumpy:mainfrom
Andrej730:fix_typing_arguments

Conversation

@Andrej730
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@github-actions

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
Copy Markdown
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
67 of 68 checks passed
@jorenham
Copy link
Copy Markdown
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