Skip to content
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

ENH: Add dtype-support to 3 generic/ndarray methods #19745

Merged
merged 2 commits into from Aug 24, 2021

Conversation

@BvB93
Copy link
Contributor

@BvB93 BvB93 commented Aug 24, 2021

backport of #19140
closes #19716

While #19140 was technically an enhancement, the problem was that prior to the PR the incorrect usage of
a typevar would ensure that the new dtype was ignored when using the likes of ndarray.astype.


This PR adds dtype-support to the annotations of the following 3 generic/ndarray methods:

  • astype
  • view
  • getfield
@BvB93 BvB93 added this to the 1.21.3 release milestone Aug 24, 2021
@BvB93 BvB93 linked an issue that may be closed by this pull request Aug 24, 2021
@charris charris merged commit 75f55a2 into numpy:maintenance/1.21.x Aug 24, 2021
37 checks passed
Loading
@charris
Copy link
Member

@charris charris commented Aug 24, 2021

Thanks Bas.

Loading

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

Successfully merging this pull request may close these issues.

2 participants