On 15/07/2021 22:11, William Stein wrote:
On Thu, Jul 15, 2021 at 11:05 AM William Stein wrote:
On Thu, Jul 15, 2021 at 9:13 AM Nils Bruin wrote:
Following up: while sage's "RationalNumber" is indeed a numbers.Rational according to "isinstance", it does not actually adhere
to the stated AP
On Thu, Jul 15, 2021 at 11:05 AM William Stein wrote:
>
> On Thu, Jul 15, 2021 at 9:13 AM Nils Bruin wrote:
> >
> > Following up: while sage's "RationalNumber" is indeed a numbers.Rational
> > according to "isinstance", it does not actually adhere to the stated API:
> > "numerator" and "denomin
See https://trac.sagemath.org/ticket/28234
Le 15/07/2021 à 18:13, Nils Bruin a écrit :
Following up: while sage's "RationalNumber" is indeed a numbers.Rational
according to "isinstance", it does not actually adhere to the stated API:
"numerator" and "denominator" are supposed to be properties, b
On Thu, Jul 15, 2021 at 9:13 AM Nils Bruin wrote:
>
> Following up: while sage's "RationalNumber" is indeed a numbers.Rational
> according to "isinstance", it does not actually adhere to the stated API:
> "numerator" and "denominator" are supposed to be properties, but in sage they
> are method
Following up: while sage's "RationalNumber" is indeed a numbers.Rational
according to "isinstance", it does not actually adhere to the stated API:
"numerator" and "denominator" are supposed to be properties, but in sage
they are methods. So even in places where we are trying to fit into
"Number
Taking a quick look at the relevant PEP
https://www.python.org/dev/peps/pep-3141/ or the documentation
https://docs.python.org/3/library/numbers.html#module-numbers (the PEP has
considerably more detail), I get the impression that our Integer and
Rational type could be incorporated in the hiera
I don't think there is any deep reason. Sage started much before the
existence of the numbers Python module.
Note that the concept of "Number" is not clearly stated in the library.
Does it include finite fields? padics? polynomials (these can be seen
as infinitesimal deformation of scalars)?
Vin
Hi, I was looking into typing a bit and realized that our number field
elements are not registered as numbers. So the following will not evaluate
to true:
sage: import numbers
sage: K. = QuadraticField(2)
sage: isinstance(a, numbers.Number)
Is there a reason, we do not register number fields in