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

Commit 10c5abf

Browse files
committed
#18036 doctest updates: misc benign changes
1 parent 671eed0 commit 10c5abf

File tree

12 files changed

+20
-22
lines changed

12 files changed

+20
-22
lines changed

src/doc/en/prep/Programming.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ not have :math:`I=\sqrt{-1}`, decimal points, or division.
728728
sage: parent(c)
729729
Real Field with 53 bits of precision
730730
sage: parent(d)
731-
Symbolic Ring
731+
Number Field in I with defining polynomial x^2 + 1 with I = 1*I
732732
sage: parent(e)
733-
Symbolic Ring
733+
Complex Field with 53 bits of precision
734734

src/sage/categories/rings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ def __getitem__(self, arg):
999999
and orders in number fields::
10001000
10011001
sage: ZZ[I]
1002-
Order in Number Field in I with defining polynomial x^2 + 1 with I = 1*I
1002+
Order in Number Field in I0 with defining polynomial x^2 + 1 with I0 = 1*I
10031003
sage: ZZ[sqrt(5)]
10041004
Order in Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790?
10051005
sage: ZZ[sqrt(2)+sqrt(3)]

src/sage/groups/abelian_gps/values.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class AbelianGroupWithValuesEmbedding(Morphism):
164164
sage: embedding = Z4.values_embedding(); embedding
165165
Generic morphism:
166166
From: Multiplicative Abelian group isomorphic to C4
167-
To: Symbolic Ring
167+
To: Number Field in I with defining polynomial x^2 + 1 with I = 1*I
168168
sage: embedding(1)
169169
1
170170
sage: embedding(g)
@@ -184,7 +184,7 @@ def __init__(self, domain, codomain):
184184
sage: AbelianGroupWithValuesEmbedding(Z4, Z4.values_group())
185185
Generic morphism:
186186
From: Multiplicative Abelian group isomorphic to C4
187-
To: Symbolic Ring
187+
To: Number Field in I with defining polynomial x^2 + 1 with I = 1*I
188188
"""
189189
assert domain.values_group() is codomain
190190
from sage.categories.homset import Hom
@@ -479,7 +479,7 @@ def values_group(self):
479479
480480
sage: Z4 = AbelianGroupWithValues([I], [4])
481481
sage: Z4.values_group()
482-
Symbolic Ring
482+
Number Field in I with defining polynomial x^2 + 1 with I = 1*I
483483
"""
484484
return self._values_group
485485

@@ -497,6 +497,6 @@ def values_embedding(self):
497497
sage: Z4.values_embedding()
498498
Generic morphism:
499499
From: Multiplicative Abelian group isomorphic to C4
500-
To: Symbolic Ring
500+
To: Number Field in I with defining polynomial x^2 + 1 with I = 1*I
501501
"""
502502
return AbelianGroupWithValuesEmbedding(self, self.values_group())

src/sage/matrix/special.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ def elementary_matrix(arg0, arg1=None, **kwds):
12331233
12341234
sage: E = elementary_matrix(4, row1=1, scale=I)
12351235
sage: E.parent()
1236-
Full MatrixSpace of 4 by 4 dense matrices over Symbolic Ring
1236+
Full MatrixSpace of 4 by 4 dense matrices over Number Field in I with defining polynomial x^2 + 1 with I = 1*I
12371237
12381238
sage: E = elementary_matrix(4, row1=1, scale=CDF(I))
12391239
sage: E.parent()

src/sage/matrix/tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
[-1.00000000000000*I -1.00000000000000*I]
5353
[-1.00000000000000*I -1.00000000000000*I]
5454
sage: A.parent()
55-
Full MatrixSpace of 2 by 2 dense matrices over Symbolic Ring
55+
Full MatrixSpace of 2 by 2 dense matrices over Complex Field with 53 bits of precision
5656
5757
We test an example determinant computation where LinBox gave an incorrect
5858
result::

src/sage/modules/matrix_morphism.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ def _call_with_args(self, x, args=(), kwds={}):
213213
sage: f((1, 0))
214214
Traceback (most recent call last):
215215
...
216-
TypeError: Unable to coerce entries (=[1.00000000000000*I, 0]) to coefficients in Real Field with 53 bits of precision
216+
TypeError: Unable to coerce entries (=[1.00000000000000*I, 0.000000000000000]) to coefficients in Real Field with 53 bits of precision
217217
sage: f((1, 0), coerce=False)
218-
(1.00000000000000*I, 0)
218+
(1.00000000000000*I, 0.000000000000000)
219219
220220
"""
221221
if self.domain().is_ambient():

src/sage/rings/complex_mpc.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ cdef class MPComplexField_class(sage.rings.ring.Field):
422422
sage: C20(i*4, 7)
423423
Traceback (most recent call last):
424424
...
425-
TypeError: unable to coerce to a ComplexNumber: <type 'sage.symbolic.expression.Expression'>
425+
TypeError: unable to coerce to a ComplexNumber: <type 'sage.rings.number_field.number_field_element_quadratic.NumberFieldElement_gaussian'>
426426
427427
Each part can be set with strings (written in base ten)::
428428

src/sage/rings/number_field/number_field_element.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2324,7 +2324,7 @@ cdef class NumberFieldElement(FieldElement):
23242324
sage: 2^a
23252325
Traceback (most recent call last):
23262326
...
2327-
TypeError: an embedding into RR or CC must be specified
2327+
TypeError: no canonical coercion from Number Field in a with defining polynomial x^2 + 1 to Symbolic Ring
23282328
"""
23292329
if (isinstance(base, NumberFieldElement) and
23302330
(isinstance(exp, Integer) or type(exp) is int or exp in ZZ)):

src/sage/rings/number_field/number_field_element_quadratic.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,7 @@ cdef class NumberFieldElement_quadratic(NumberFieldElement_absolute):
18581858
-1/2
18591859
sage: SR(a)
18601860
1/2*I*sqrt(3) - 1/2
1861-
sage: bool(I*a.imag() + a.real() == a)
1861+
sage: bool(QQbar(I)*QQbar(a.imag()) + QQbar(a.real()) == QQbar(a))
18621862
True
18631863
18641864
TESTS::

src/sage/rings/polynomial/cyclotomic.pyx

+1-3
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,7 @@ def cyclotomic_value(n, x):
283283
Check that the issue with symbolic element in :trac:`14982` is fixed::
284284
285285
sage: a = cyclotomic_value(3, I)
286-
sage: a.pyobject()
287-
I
288-
sage: parent(_)
286+
sage: parent(a)
289287
Number Field in I with defining polynomial x^2 + 1 with I = 1*I
290288
"""
291289
n = ZZ(n)

src/sage/rings/puiseux_series_ring_element.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Mind the base ring. However, the base ring can be changed::
4949
sage: I*q
5050
Traceback (most recent call last):
5151
...
52-
TypeError: unsupported operand parent(s) for *: 'Symbolic Ring' and 'Puiseux Series Ring in x over Rational Field'
52+
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'
5353
sage: qz = q.change_ring(ZZ); qz
5454
x^(1/3) + x^(1/2)
5555
sage: qz.parent()

src/sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,14 @@
246246
Sage example in ./domaines.tex, line 1036::
247247
248248
sage: I.parent()
249-
Symbolic Ring
249+
Number Field in I with defining polynomial x^2 + 1 with I = 1*I
250250
251251
Sage example in ./domaines.tex, line 1043::
252252
253253
sage: (1.+2.*I).parent()
254-
Symbolic Ring
255-
sage: CC(1.+2.*I).parent()
256254
Complex Field with 53 bits of precision
255+
sage: (1.+2.*SR(I)).parent()
256+
Symbolic Ring
257257
258258
Sage example in ./domaines.tex, line 1064::
259259
@@ -340,7 +340,7 @@
340340
Sage example in ./domaines.tex, line 1428::
341341
342342
sage: SR.category()
343-
Category of commutative rings
343+
Category of fields
344344
345345
Sage example in ./domaines.tex, line 1482::
346346

0 commit comments

Comments
 (0)