Skip to content

Commit 7b141f4

Browse files
author
Matthias Koeppe
committed
sage.rings: Update # optional / # needs
1 parent 2f00618 commit 7b141f4

File tree

6 files changed

+20
-11
lines changed

6 files changed

+20
-11
lines changed

src/sage/rings/polynomial/cyclotomic.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def cyclotomic_value(n, x):
265265
....: if val1.parent() is not val2.parent():
266266
....: print("Wrong parent for cyclotomic_value(%s, %s) in %s"%(n,y,parent(y)))
267267
268-
sage: cyclotomic_value(20, I)
268+
sage: cyclotomic_value(20, I) # optional - sage.symbolic
269269
5
270270
sage: a = cyclotomic_value(10, mod(3, 11)); a
271271
6

src/sage/rings/polynomial/infinite_polynomial_ring.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@
8686
There is a permutation action on the variables, by permuting positive
8787
variable indices::
8888
89-
sage: P = Permutation(((10,1))) # optional - sage.combinat
90-
sage: p^P # optional - sage.combinat
89+
sage: P = Permutation(((10,1)))
90+
sage: p^P
9191
x_5*x_1^2 + 3*x_1^2*y_10 + 2*x_1^2
92-
sage: p2^P # optional - sage.combinat
92+
sage: p2^P
9393
alpha_5*alpha_1^2 + 3*alpha_1^2*beta_10 + 2*alpha_1^2
9494
9595
Note that `x_0^P = x_0`, since the permutations only change *positive*
@@ -103,7 +103,7 @@
103103
base ring is a field, one can compute Symmetric Groebner Bases::
104104
105105
sage: J = A * (alpha[1]*beta[2])
106-
sage: J.groebner_basis() # optional - sage.combinat sage.libs.singular
106+
sage: J.groebner_basis() # needs sage.combinat sage.libs.singular
107107
[alpha_1*beta_2, alpha_2*beta_1]
108108
109109
For more details, see :class:`~sage.rings.polynomial.symmetric_ideal.SymmetricIdeal`.
@@ -1297,10 +1297,10 @@ def characteristic(self):
12971297
12981298
EXAMPLES::
12991299
1300-
sage: X.<x,y> = InfinitePolynomialRing(GF(25,'a')) # optional - sage.rings.finite_rings
1301-
sage: X # optional - sage.rings.finite_rings
1300+
sage: X.<x,y> = InfinitePolynomialRing(GF(25,'a')) # needs sage.rings.finite_rings
1301+
sage: X # needs sage.rings.finite_rings
13021302
Infinite polynomial ring in x, y over Finite Field in a of size 5^2
1303-
sage: X.characteristic() # optional - sage.rings.finite_rings
1303+
sage: X.characteristic() # needs sage.rings.finite_rings
13041304
5
13051305
13061306
"""
@@ -1364,7 +1364,7 @@ def key_basis(self):
13641364
EXAMPLES::
13651365
13661366
sage: R.<x> = InfinitePolynomialRing(GF(2))
1367-
sage: R.key_basis() # optional - sage.rings.finite_rings
1367+
sage: R.key_basis() # needs sage.rings.finite_rings
13681368
Key polynomial basis over Finite Field of size 2
13691369
"""
13701370
from sage.combinat.key_polynomial import KeyPolynomialBasis

src/sage/rings/polynomial/multi_polynomial.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ cdef class MPolynomial(CommutativePolynomial):
4040
r"""
4141
TESTS::
4242
43+
sage: # needs sage.rings.real_mpfr
4344
sage: ZZ(RR['x,y'](0)) # indirect doctest
4445
0
4546
sage: ZZ(RR['x,y'](0.5))
@@ -51,34 +52,39 @@ cdef class MPolynomial(CommutativePolynomial):
5152
...
5253
TypeError: unable to convert non-constant polynomial x to Integer Ring
5354
55+
sage: # needs sage.rings.real_mpfr
5456
sage: RR(RR['x,y'](0)) # indirect doctest
5557
0.000000000000000
5658
sage: RR(ZZ['x,y'].gen(0))
5759
Traceback (most recent call last):
5860
...
5961
TypeError: unable to convert non-constant polynomial x to Real Field with 53 bits of precision
6062
63+
sage: # needs sage.rings.real_mpfr
6164
sage: CC(RR['x,y'](0)) # indirect doctest
6265
0.000000000000000
6366
sage: CC(ZZ['x,y'].gen(0))
6467
Traceback (most recent call last):
6568
...
6669
TypeError: unable to convert non-constant polynomial x to Complex Field with 53 bits of precision
6770
71+
sage: # needs sage.rings.real_mpfr
6872
sage: RDF(RR['x,y'](0))
6973
0.0
7074
sage: RDF(ZZ['x,y'].gen(0))
7175
Traceback (most recent call last):
7276
...
7377
TypeError: unable to convert non-constant polynomial x to Real Double Field
7478
79+
sage: # needs sage.rings.real_mpfr
7580
sage: CDF(RR['x,y'](0)) # indirect doctest
7681
0.0
7782
sage: CDF(ZZ['x,y'].gen(0))
7883
Traceback (most recent call last):
7984
...
8085
TypeError: unable to convert non-constant polynomial x to Complex Double Field
8186
87+
sage: # needs sage.rings.real_mpfr
8288
sage: a = RR['x,y'](1)
8389
sage: RBF(a) # needs sage.libs.flint
8490
1.000000000000000

src/sage/rings/polynomial/multi_polynomial_ring_base.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ cdef class MPolynomialRing_base(sage.rings.ring.CommutativeRing):
13841384
13851385
sage: R.<x,y,z> = ZZ[]
13861386
sage: mons = R.monomials_of_degree(2) # optional - sage.combinat
1387-
sage: mons
1387+
sage: mons # optional - sage.combinat
13881388
[z^2, y*z, x*z, y^2, x*y, x^2]
13891389
sage: P = PolynomialRing(QQ, 3, 'x, y, z', order=TermOrder('wdeglex', [1, 2, 1]))
13901390
sage: P.monomials_of_degree(2) # optional - sage.combinat

src/sage/rings/polynomial/polynomial_element.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4127,14 +4127,16 @@ cdef class Polynomial(CommutativePolynomial):
41274127
41284128
Arbitrary precision real and complex factorization::
41294129
4130+
sage: # needs sage.libs.pari sage.rings.real_mpfr
41304131
sage: R.<x> = RealField(100)[] # optional - sage.rings.real_mpfr
4131-
sage: F = factor(x^2 - 3); F # optional - sage.rings.real_mpfr
4132+
sage: F = factor(x^2 - 3); F
41324133
(x - 1.7320508075688772935274463415) * (x + 1.7320508075688772935274463415)
41334134
sage: expand(F) # optional - sage.rings.real_mpfr
41344135
x^2 - 3.0000000000000000000000000000
41354136
sage: factor(x^2 + 1) # optional - sage.rings.real_mpfr
41364137
x^2 + 1.0000000000000000000000000000
41374138
4139+
sage: # needs sage.libs.pari sage.rings.real_mpfr
41384140
sage: R.<x> = ComplexField(100)[] # optional - sage.rings.real_mpfr
41394141
sage: F = factor(x^2 + 3); F # optional - sage.rings.real_mpfr
41404142
(x - 1.7320508075688772935274463415*I) * (x + 1.7320508075688772935274463415*I)

src/sage/rings/polynomial/polynomial_ring_constructor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ def PolynomialRing(base_ring, *args, **kwds):
355355
You can alternatively create a polynomial ring over a ring `R` with
356356
square brackets::
357357
358+
sage: # needs sage.rings.real_mpfr
358359
sage: RR["x"]
359360
Univariate Polynomial Ring in x over Real Field with 53 bits of precision
360361
sage: RR["x,y"]

0 commit comments

Comments
 (0)