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

mpz/mpq should implement numbers.Integral/Rational #4

Open
skirpichev opened this issue Jul 27, 2018 · 0 comments
Open

mpz/mpq should implement numbers.Integral/Rational #4

skirpichev opened this issue Jul 27, 2018 · 0 comments

Comments

@skirpichev
Copy link

Right now, for example, numerator/denominator attributes are missing for mpz. Also, classes aren't properly registered.

In [6]: gmpy_cffi.mpz(2)
Out[6]: mpz(2)

In [7]: _6.numerator
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-e929b9596bbc> in <module>()
----> 1 _6.numerator

AttributeError: 'mpz' object has no attribute 'numerator'

In [8]: isinstance(_6, numbers.Integral)
Out[8]: False

In [9]: isinstance(gmpy_cffi.mpq(2), numbers.Rational)
Out[9]: False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant