8000 TST: Don't construct Fraction instances from numpy scalars by eric-wieser · Pull Request #14805 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

TST: Don't construct Fraction instances from numpy scalars #14805

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

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

eric-wieser
Copy link
Member
@eric-wieser eric-wieser commented Oct 30, 2019

Fraction.__float__ gives a DeprecationWarning if the division results in a non-builtin float

>>> float(Fraction(1, np.uint8(1)))
DeprecationWarning: Fraction.__float__ returned non-float (type numpy.float64).  The ability to return an instance of a strict subclass of float is deprecated, and may be removed in a future version of Python.

This was never intended as part of the test anyway.

Extracted from gh-14802

Fraction.__float__ gives a DeprecationWarning if the division results in a non-builtin float

This was never intended as part of the test anyway.
@mattip mattip merged commit cadb066 into numpy:master Nov 4, 2019
@eric-wieser eric-wieser deleted the no-Fractions-from-np-scalars branch November 11, 2019 22:13
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.

2 participants
0