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

MAINT: Annotate missing attributes of np.number subclasses #19350

Merged
merged 2 commits into from Jun 25, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Jun 25, 2021

backport of #19344
xref #19339

A number of np.number subclass attributes were previously absent from the stub files.
This PR fixes aforementioned issue, adding annotations for the following properties and methods:

  • integer.numerator & denominator
  • integer.__round__ & floating.__round__
  • floating.as_integer_ratio
  • float64.__getnewargs__ & complex128.__getnewargs__
  • float64.is_integer, hex, fromhex, __trunc__ & __getformat__
  • float64.__ceil__ & float64.__floor__ (python >= 3.9 only)

Bas van Beek added 2 commits June 25, 2021 21:59
* `integer.numerator` & `denominator`
* `integer.__round__` & `floating.__round__`
* `floating.as_integer_ratio`
* `float64.__getnewargs__` / `complex128.__getnewargs__`
* `float64.is_integer`, `hex`, `fromhex`, `__trunc__` & `__getformat__`
* `float64.__ceil__` & `float64.__floor__` (python >= 3.9 only)
@BvB93 BvB93 added this to the 1.21.1 release milestone Jun 25, 2021
@charris charris merged commit 2e32825 into numpy:maintenance/1.21.x Jun 25, 2021
@charris
Copy link
Member

charris commented Jun 25, 2021

Thanks Bas.

@BvB93 BvB93 deleted the attr branch June 25, 2021 21:46
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.

None yet

2 participants