Skip to content

Commit 7a65d8f

Browse files
author
Matthias Koeppe
committed
src/sage/databases: sage -fixdoctests --only-tags
1 parent 75aaf58 commit 7a65d8f

File tree

7 files changed

+68
-59
lines changed

7 files changed

+68
-59
lines changed

src/sage/databases/cremona.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def cremona_letter_code(n):
217217
Traceback (most recent call last):
218218
...
219219
ValueError: Cremona letter codes are only defined for non-negative integers
220-
sage: cremona_letter_code(x)
220+
sage: cremona_letter_code(x) # needs sage.symbolic
221221
Traceback (most recent call last):
222222
...
223223
ValueError: Cremona letter codes are only defined for non-negative integers

src/sage/databases/cubic_hecke_db.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,10 +1494,10 @@ def read_markov(bas_ele, variables, num_strands=4):
14941494
EXAMPLES::
14951495
14961496
sage: from sage.databases.cubic_hecke_db import read_markov
1497-
sage: from sympy import var
1498-
sage: u, v, w, s = var('u, v, w, s')
1499-
sage: variables = (u, v, w, s)
1500-
sage: read_markov('U2', variables, num_strands=3)
1497+
sage: from sympy import var # needs sympy
1498+
sage: u, v, w, s = var('u, v, w, s') # needs sympy
1499+
sage: variables = (u, v, w, s) # needs sympy
1500+
sage: read_markov('U2', variables, num_strands=3) # needs sympy
15011501
[0, s, 1/s, s, 1/s, 0, 0, 0, 0, -s*v, s, s, -s*u/w, -v/s, 1/s,
15021502
0, 0, 0, 0, 1/s, -u/(s*w), -v/s, 0, 0]
15031503
"""

src/sage/databases/db_modular_polynomials.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@ def _dbz_to_string(name):
2020
r"""
2121
TESTS::
2222
23+
sage: # optional - database_kohel
2324
sage: from sage.databases.db_modular_polynomials import _dbz_to_string
24-
sage: _dbz_to_string('PolMod/Atk/pol.002.dbz') # optional - database_kohel
25+
sage: _dbz_to_string('PolMod/Atk/pol.002.dbz')
2526
'3 0 1 \n2 1 -1 \n2 0 744 \n1 1 -1 \n1 0 184512 \n0 2 1 \n0 1 7256 \n0 0 15252992 \n'
26-
sage: _dbz_to_string('PolMod/Cls/pol.001.dbz') # optional - database_kohel
27+
sage: _dbz_to_string('PolMod/Cls/pol.001.dbz')
2728
'1 0 1 \n'
28-
sage: _dbz_to_string('PolMod/Eta/pol.002.dbz') # optional - database_kohel
29+
sage: _dbz_to_string('PolMod/Eta/pol.002.dbz')
2930
'3 0 1 \n2 0 48 \n1 1 -1 \n1 0 768 \n0 0 4096 \n'
30-
sage: _dbz_to_string('PolMod/EtaCrr/crr.02.002.dbz') # optional - database_kohel
31+
sage: _dbz_to_string('PolMod/EtaCrr/crr.02.002.dbz')
3132
'2 1 1 \n2 0 -48 \n1 1 2304 \n0 2 -4096 \n0 1 196608 \n'
32-
sage: _dbz_to_string('PolHeeg/Cls/0000001-0005000/pol.0000003.dbz') # optional - database_kohel
33+
sage: _dbz_to_string('PolHeeg/Cls/0000001-0005000/pol.0000003.dbz')
3334
'0\n1\n'
3435
"""
3536
from sage.env import SAGE_SHARE

src/sage/databases/findstat.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,11 +1556,12 @@ def reset(self):
15561556
15571557
Check that new statistics and maps cannot be reset::
15581558
1559-
sage: q = findstat([(d, randint(1, 1000)) for d in DyckWords(4)]) # optional -- internet
1560-
sage: q.set_description("Random values on Dyck paths.") # optional -- internet
1561-
sage: print(q.description()) # optional -- internet
1559+
sage: # optional - internet
1560+
sage: q = findstat([(d, randint(1, 1000)) for d in DyckWords(4)])
1561+
sage: q.set_description("Random values on Dyck paths.")
1562+
sage: print(q.description())
15621563
Random values on Dyck paths.
1563-
sage: q.reset() # optional -- internet
1564+
sage: q.reset()
15641565
Traceback (most recent call last):
15651566
...
15661567
ValueError: cannot reset values of St000000: a new statistic on Dyck paths
@@ -3280,14 +3281,15 @@ def set_properties_raw(self, value):
32803281
32813282
EXAMPLES::
32823283
3283-
sage: from sage.databases.findstat import FindStatMap # optional -- internet
3284-
sage: FindStatMap(61).set_properties_raw('surjective') # optional -- internet
3285-
sage: FindStatMap(61).properties_raw() # optional -- internet
3284+
sage: # optional - internet
3285+
sage: from sage.databases.findstat import FindStatMap
3286+
sage: FindStatMap(61).set_properties_raw('surjective')
3287+
sage: FindStatMap(61).properties_raw()
32863288
'surjective'
3287-
sage: FindStatMap(61) # optional -- internet
3289+
sage: FindStatMap(61)
32883290
Mp00061(modified): to increasing tree
3289-
sage: FindStatMap(61).reset() # optional -- internet
3290-
sage: FindStatMap(61) # optional -- internet
3291+
sage: FindStatMap(61).reset()
3292+
sage: FindStatMap(61)
32913293
Mp00061: to increasing tree
32923294
"""
32933295
if value != self.properties_raw():
@@ -4283,13 +4285,14 @@ def in_range(self, element):
42834285
42844286
EXAMPLES::
42854287
4288+
sage: # optional - internet
42864289
sage: from sage.databases.findstat import FindStatCollection
4287-
sage: c = FindStatCollection("GelfandTsetlinPatterns") # optional -- internet
4288-
sage: c.in_range(GelfandTsetlinPattern([[2, 1], [1]])) # optional -- internet
4290+
sage: c = FindStatCollection("GelfandTsetlinPatterns")
4291+
sage: c.in_range(GelfandTsetlinPattern([[2, 1], [1]]))
42894292
True
4290-
sage: c.in_range(GelfandTsetlinPattern([[3, 1], [1]])) # optional -- internet
4293+
sage: c.in_range(GelfandTsetlinPattern([[3, 1], [1]]))
42914294
True
4292-
sage: c.in_range(GelfandTsetlinPattern([[7, 1], [1]])) # optional -- internet
4295+
sage: c.in_range(GelfandTsetlinPattern([[7, 1], [1]]))
42934296
False
42944297
42954298
TESTS::

src/sage/databases/jones.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,20 +256,21 @@ def ramified_at(self, S, d=None, var='a'):
256256
257257
EXAMPLES::
258258
259-
sage: J = JonesDatabase() # optional - database_jones_numfield
260-
sage: J.ramified_at([101,109]) # optional - database_jones_numfield
259+
sage: # optional - database_jones_numfield
260+
sage: J = JonesDatabase()
261+
sage: J.ramified_at([101,109])
261262
[]
262-
sage: J.ramified_at([109]) # optional - database_jones_numfield
263+
sage: J.ramified_at([109])
263264
[Number Field in a with defining polynomial x^2 - 109,
264265
Number Field in a with defining polynomial x^3 - x^2 - 36*x + 4,
265266
Number Field in a with defining polynomial x^4 - x^3 + 14*x^2 + 34*x + 393]
266-
sage: J.ramified_at(101) # optional - database_jones_numfield
267+
sage: J.ramified_at(101)
267268
[Number Field in a with defining polynomial x^2 - 101,
268269
Number Field in a with defining polynomial x^4 - x^3 + 13*x^2 - 19*x + 361,
269270
Number Field in a with defining polynomial x^5 + x^4 - 6*x^3 - x^2 + 18*x + 4,
270271
Number Field in a with defining polynomial x^5 + 2*x^4 + 7*x^3 + 4*x^2 + 11*x - 6,
271272
Number Field in a with defining polynomial x^5 - x^4 - 40*x^3 - 93*x^2 - 21*x + 17]
272-
sage: J.ramified_at((2, 5, 29), 3, 'c') # optional - database_jones_numfield
273+
sage: J.ramified_at((2, 5, 29), 3, 'c')
273274
[Number Field in c with defining polynomial x^3 - x^2 - 8*x - 28,
274275
Number Field in c with defining polynomial x^3 - x^2 + 10*x + 102,
275276
Number Field in c with defining polynomial x^3 - x^2 - 48*x - 188,

src/sage/databases/oeis.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,25 @@
109109
110110
::
111111
112-
sage: x = var('x') ; f(x) = e^(e^x - 1)
113-
sage: L = [a*factorial(b) for a,b in taylor(f(x), x, 0, 20).coefficients()] ; L
112+
sage: x = var('x') ; f(x) = e^(e^x - 1) # needs sage.symbolic
113+
sage: L = [a*factorial(b) for a,b in taylor(f(x), x, 0, 20).coefficients()]; L # needs sage.symbolic
114114
[1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147, 115975, 678570, 4213597,
115115
27644437, 190899322, 1382958545, 10480142147, 82864869804, 682076806159,
116116
5832742205057, 51724158235372]
117117
118-
sage: oeis(L) # optional -- internet
118+
sage: oeis(L) # optional - internet # needs sage.symbolic
119119
0: A000110: Bell or exponential numbers: number of ways to partition a set of n labeled elements.
120120
1: A292935: E.g.f.: exp(exp(-x) - 1).
121121
122-
sage: b = _[0] # optional -- internet
122+
sage: b = _[0] # optional - internet # needs sage.symbolic
123123
124-
sage: b.formulas()[0] # optional -- internet
124+
sage: b.formulas()[0] # optional - internet # needs sage.symbolic
125125
'E.g.f.: exp(exp(x) - 1).'
126126
127-
sage: [i for i in b.comments() if 'prime' in i][-1] # optional -- internet
127+
sage: [i for i in b.comments() if 'prime' in i][-1] # optional - internet, needs sage.symbolic
128128
'Number n is prime if ...'
129129
130-
sage: [n for n in range(2, 20) if (b(n)-2) % n == 0] # optional -- internet
130+
sage: [n for n in range(2, 20) if (b(n)-2) % n == 0] # optional - internet, needs sage.symbolic
131131
[2, 3, 5, 7, 11, 13, 17, 19]
132132
133133
.. SEEALSO::
@@ -1033,8 +1033,8 @@ def natural_object(self):
10331033
sage: RDF(x) == RDF(euler_gamma) # optional -- internet
10341034
True
10351035
1036-
sage: cfg = continued_fraction(euler_gamma)
1037-
sage: x[:90] == cfg[:90] # optional -- internet
1036+
sage: cfg = continued_fraction(euler_gamma) # needs sage.symbolic
1037+
sage: x[:90] == cfg[:90] # optional - internet # needs sage.symbolic
10381038
True
10391039
10401040
::
@@ -1440,14 +1440,15 @@ def __iter__(self):
14401440
sage: w = oeis(7540) ; w # optional -- internet
14411441
A007540: Wilson primes: primes p such that (p-1)! == -1 (mod p^2).
14421442
1443-
sage: i = w.__iter__() # optional -- internet
1444-
sage: next(i) # optional -- internet
1443+
sage: # optional - internet
1444+
sage: i = w.__iter__()
1445+
sage: next(i)
14451446
5
1446-
sage: next(i) # optional -- internet
1447+
sage: next(i)
14471448
13
1448-
sage: next(i) # optional -- internet
1449+
sage: next(i)
14491450
563
1450-
sage: next(i) # optional -- internet
1451+
sage: next(i)
14511452
Traceback (most recent call last):
14521453
...
14531454
LookupError: future values not provided by OEIS

src/sage/databases/stein_watkins.py

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@
4444
We type ``next(d)`` to get each isogeny class of
4545
curves from ``d``::
4646
47-
sage: C = next(d) # optional - database_stein_watkins
48-
sage: C # optional - database_stein_watkins
47+
sage: # optional - database_stein_watkins
48+
sage: C = next(d)
49+
sage: C
4950
Stein-Watkins isogeny class of conductor 11
50-
sage: next(d) # optional - database_stein_watkins
51+
sage: next(d)
5152
Stein-Watkins isogeny class of conductor 14
52-
sage: next(d) # optional - database_stein_watkins
53+
sage: next(d)
5354
Stein-Watkins isogeny class of conductor 15
5455
5556
An isogeny class has a number of attributes that give data about
@@ -58,21 +59,22 @@
5859
5960
::
6061
61-
sage: C.data # optional - database_stein_watkins
62+
sage: # optional - database_stein_watkins
63+
sage: C.data
6264
['11', '[11]', '0', '0.253842', '25', '+*1']
63-
sage: C.curves # optional - database_stein_watkins
65+
sage: C.curves
6466
[[[0, -1, 1, 0, 0], '(1)', '1', '5'],
6567
[[0, -1, 1, -10, -20], '(5)', '1', '5'],
6668
[[0, -1, 1, -7820, -263580], '(1)', '1', '1']]
67-
sage: C.conductor # optional - database_stein_watkins
69+
sage: C.conductor
6870
11
69-
sage: C.leading_coefficient # optional - database_stein_watkins
71+
sage: C.leading_coefficient
7072
'0.253842'
71-
sage: C.modular_degree # optional - database_stein_watkins
73+
sage: C.modular_degree
7274
'+*1'
73-
sage: C.rank # optional - database_stein_watkins
75+
sage: C.rank
7476
0
75-
sage: C.isogeny_number # optional - database_stein_watkins
77+
sage: C.isogeny_number
7678
'25'
7779
7880
If we were to continue typing ``next(d)`` we would
@@ -101,16 +103,17 @@
101103
Each call ``next(d)`` gives another elliptic curve of
102104
prime conductor::
103105
104-
sage: C = next(d) # optional - database_stein_watkins
105-
sage: C # optional - database_stein_watkins
106+
sage: # optional - database_stein_watkins
107+
sage: C = next(d)
108+
sage: C
106109
Stein-Watkins isogeny class of conductor 17
107-
sage: C.curves # optional - database_stein_watkins
110+
sage: C.curves
108111
[[[1, -1, 1, -1, 0], '[1]', '1', '4'],
109112
[[1, -1, 1, -6, -4], '[2]', '1', '2x'],
110113
[[1, -1, 1, -1, -14], '(4)', '1', '4'],
111114
[[1, -1, 1, -91, -310], '[1]', '1', '2']]
112-
sage: C = next(d) # optional - database_stein_watkins
113-
sage: C # optional - database_stein_watkins
115+
sage: C = next(d)
116+
sage: C
114117
Stein-Watkins isogeny class of conductor 19
115118
116119
REFERENCE:

0 commit comments

Comments
 (0)