Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
#18036 doctest updates: misc benign changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mezzarobba committed Nov 8, 2020
1 parent 671eed0 commit 10c5abf
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/doc/en/prep/Programming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ not have :math:`I=\sqrt{-1}`, decimal points, or division.
sage: parent(c)
Real Field with 53 bits of precision
sage: parent(d)
Symbolic Ring
Number Field in I with defining polynomial x^2 + 1 with I = 1*I
sage: parent(e)
Symbolic Ring
Complex Field with 53 bits of precision

2 changes: 1 addition & 1 deletion src/sage/categories/rings.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ def __getitem__(self, arg):
and orders in number fields::
sage: ZZ[I]
Order in Number Field in I with defining polynomial x^2 + 1 with I = 1*I
Order in Number Field in I0 with defining polynomial x^2 + 1 with I0 = 1*I
sage: ZZ[sqrt(5)]
Order in Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790?
sage: ZZ[sqrt(2)+sqrt(3)]
Expand Down
8 changes: 4 additions & 4 deletions src/sage/groups/abelian_gps/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class AbelianGroupWithValuesEmbedding(Morphism):
sage: embedding = Z4.values_embedding(); embedding
Generic morphism:
From: Multiplicative Abelian group isomorphic to C4
To: Symbolic Ring
To: Number Field in I with defining polynomial x^2 + 1 with I = 1*I
sage: embedding(1)
1
sage: embedding(g)
Expand All @@ -184,7 +184,7 @@ def __init__(self, domain, codomain):
sage: AbelianGroupWithValuesEmbedding(Z4, Z4.values_group())
Generic morphism:
From: Multiplicative Abelian group isomorphic to C4
To: Symbolic Ring
To: Number Field in I with defining polynomial x^2 + 1 with I = 1*I
"""
assert domain.values_group() is codomain
from sage.categories.homset import Hom
Expand Down Expand Up @@ -479,7 +479,7 @@ def values_group(self):
sage: Z4 = AbelianGroupWithValues([I], [4])
sage: Z4.values_group()
Symbolic Ring
Number Field in I with defining polynomial x^2 + 1 with I = 1*I
"""
return self._values_group

Expand All @@ -497,6 +497,6 @@ def values_embedding(self):
sage: Z4.values_embedding()
Generic morphism:
From: Multiplicative Abelian group isomorphic to C4
To: Symbolic Ring
To: Number Field in I with defining polynomial x^2 + 1 with I = 1*I
"""
return AbelianGroupWithValuesEmbedding(self, self.values_group())
2 changes: 1 addition & 1 deletion src/sage/matrix/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ def elementary_matrix(arg0, arg1=None, **kwds):
sage: E = elementary_matrix(4, row1=1, scale=I)
sage: E.parent()
Full MatrixSpace of 4 by 4 dense matrices over Symbolic Ring
Full MatrixSpace of 4 by 4 dense matrices over Number Field in I with defining polynomial x^2 + 1 with I = 1*I
sage: E = elementary_matrix(4, row1=1, scale=CDF(I))
sage: E.parent()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/matrix/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
[-1.00000000000000*I -1.00000000000000*I]
[-1.00000000000000*I -1.00000000000000*I]
sage: A.parent()
Full MatrixSpace of 2 by 2 dense matrices over Symbolic Ring
Full MatrixSpace of 2 by 2 dense matrices over Complex Field with 53 bits of precision
We test an example determinant computation where LinBox gave an incorrect
result::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/modules/matrix_morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ def _call_with_args(self, x, args=(), kwds={}):
sage: f((1, 0))
Traceback (most recent call last):
...
TypeError: Unable to coerce entries (=[1.00000000000000*I, 0]) to coefficients in Real Field with 53 bits of precision
TypeError: Unable to coerce entries (=[1.00000000000000*I, 0.000000000000000]) to coefficients in Real Field with 53 bits of precision
sage: f((1, 0), coerce=False)
(1.00000000000000*I, 0)
(1.00000000000000*I, 0.000000000000000)
"""
if self.domain().is_ambient():
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/complex_mpc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ cdef class MPComplexField_class(sage.rings.ring.Field):
sage: C20(i*4, 7)
Traceback (most recent call last):
...
TypeError: unable to coerce to a ComplexNumber: <type 'sage.symbolic.expression.Expression'>
TypeError: unable to coerce to a ComplexNumber: <type 'sage.rings.number_field.number_field_element_quadratic.NumberFieldElement_gaussian'>
Each part can be set with strings (written in base ten)::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/number_field/number_field_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,7 @@ cdef class NumberFieldElement(FieldElement):
sage: 2^a
Traceback (most recent call last):
...
TypeError: an embedding into RR or CC must be specified
TypeError: no canonical coercion from Number Field in a with defining polynomial x^2 + 1 to Symbolic Ring
"""
if (isinstance(base, NumberFieldElement) and
(isinstance(exp, Integer) or type(exp) is int or exp in ZZ)):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,7 @@ cdef class NumberFieldElement_quadratic(NumberFieldElement_absolute):
-1/2
sage: SR(a)
1/2*I*sqrt(3) - 1/2
sage: bool(I*a.imag() + a.real() == a)
sage: bool(QQbar(I)*QQbar(a.imag()) + QQbar(a.real()) == QQbar(a))
True
TESTS::
Expand Down
4 changes: 1 addition & 3 deletions src/sage/rings/polynomial/cyclotomic.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,7 @@ def cyclotomic_value(n, x):
Check that the issue with symbolic element in :trac:`14982` is fixed::
sage: a = cyclotomic_value(3, I)
sage: a.pyobject()
I
sage: parent(_)
sage: parent(a)
Number Field in I with defining polynomial x^2 + 1 with I = 1*I
"""
n = ZZ(n)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/puiseux_series_ring_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Mind the base ring. However, the base ring can be changed::
sage: I*q
Traceback (most recent call last):
...
TypeError: unsupported operand parent(s) for *: 'Symbolic Ring' and 'Puiseux Series Ring in x over Rational Field'
TypeError: unsupported operand parent(s) for *: 'Number Field in I with defining polynomial x^2 + 1 with I = 1*I' and 'Puiseux Series Ring in x over Rational Field'
sage: qz = q.change_ring(ZZ); qz
x^(1/3) + x^(1/2)
sage: qz.parent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@
Sage example in ./domaines.tex, line 1036::
sage: I.parent()
Symbolic Ring
Number Field in I with defining polynomial x^2 + 1 with I = 1*I
Sage example in ./domaines.tex, line 1043::
sage: (1.+2.*I).parent()
Symbolic Ring
sage: CC(1.+2.*I).parent()
Complex Field with 53 bits of precision
sage: (1.+2.*SR(I)).parent()
Symbolic Ring
Sage example in ./domaines.tex, line 1064::
Expand Down Expand Up @@ -340,7 +340,7 @@
Sage example in ./domaines.tex, line 1428::
sage: SR.category()
Category of commutative rings
Category of fields
Sage example in ./domaines.tex, line 1482::
Expand Down

0 comments on commit 10c5abf

Please sign in to comment.