FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ENH: Add dtype-support to 3 `generic`/`ndarray` methods by BvB93 · Pull Request #19745 · numpy/numpy · GitHub

/ numpy Public

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

Merged
charris merged 2 commits into
numpy:maintenance/1.21.xfrom
BvB93:astype
Aug 24, 2021
Merged

charris merged 2 commits into
numpy:maintenance/1.21.xfrom
BvB93:astype

Conversation

BvB93 commented Aug 24, 2021

Copy link
Copy Markdown
Member

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 added this to the 1.21.3 release milestone Aug 24, 2021
BvB93 linked an issue Aug 24, 2021 that may be closed by this pull request
charris merged commit 75f55a2 into numpy:maintenance/1.21.x Aug 24, 2021

charris commented Aug 24, 2021

Copy link
Copy Markdown
Member

Thanks Bas.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

ndarray.astype typing ignores the passed dtype

2 participants


Back | FazBrowse Home | New Git URL