Skip to content

Commit d5d1057

Browse files
author
Matthias Koeppe
committed
./sage -fixdoctests --distribution sagemath-categories --only-tags src/sage/combinat
1 parent e591d53 commit d5d1057

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

src/sage/combinat/cluster_algebra_quiver/cluster_seed.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,11 +1042,11 @@ def plot(self, circular=False, mark=None, save_pos=False, force_c=False, with_gr
10421042
EXAMPLES::
10431043
10441044
sage: S = ClusterSeed(['A',5])
1045-
sage: S.plot() # optional - sage.plot sage.symbolic
1045+
sage: S.plot() # needs sage.plot sage.symbolic
10461046
Graphics object consisting of 15 graphics primitives
1047-
sage: S.plot(circular=True) # optional - sage.plot sage.symbolic
1047+
sage: S.plot(circular=True) # needs sage.plot sage.symbolic
10481048
Graphics object consisting of 15 graphics primitives
1049-
sage: S.plot(circular=True, mark=1) # optional - sage.plot sage.symbolic
1049+
sage: S.plot(circular=True, mark=1) # needs sage.plot sage.symbolic
10501050
Graphics object consisting of 15 graphics primitives
10511051
"""
10521052
greens = []
@@ -1088,7 +1088,7 @@ def show(self, fig_size=1, circular=False, mark=None, save_pos=False, force_c=Fa
10881088
TESTS::
10891089
10901090
sage: S = ClusterSeed(['A',5])
1091-
sage: S.show() # long time # optional - sage.plot sage.symbolic
1091+
sage: S.show() # long time # needs sage.plot sage.symbolic
10921092
"""
10931093
greens = []
10941094
if with_greens:
@@ -1122,7 +1122,7 @@ def interact(self, fig_size=1, circular=True):
11221122
TESTS::
11231123
11241124
sage: S = ClusterSeed(['A',4])
1125-
sage: S.interact() # optional - sage.plot sage.symbolic
1125+
sage: S.interact() # needs sage.plot sage.symbolic
11261126
...VBox(children=...
11271127
"""
11281128
return cluster_interact(self, fig_size, circular, kind='seed')
@@ -1144,7 +1144,7 @@ def save_image(self, filename, circular=False, mark=None, save_pos=False):
11441144
11451145
sage: S = ClusterSeed(['F',4,[1,2]])
11461146
sage: import tempfile
1147-
sage: with tempfile.NamedTemporaryFile(suffix=".png") as f: # optional - sage.plot sage.symbolic
1147+
sage: with tempfile.NamedTemporaryFile(suffix=".png") as f: # needs sage.plot sage.symbolic
11481148
....: S.save_image(f.name)
11491149
"""
11501150
graph_plot = self.plot(circular=circular, mark=mark, save_pos=save_pos)

src/sage/combinat/cluster_algebra_quiver/interact.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def cluster_interact(self, fig_size=1, circular=True, kind='seed'):
2525
2626
TESTS::
2727
28-
sage: S = ClusterSeed(['A',4]) # optional - sage.graphs sage.modules
29-
sage: S.interact() # indirect doctest # optional - sage.graphs sage.modules sage.symbolic
28+
sage: S = ClusterSeed(['A',4]) # needs sage.graphs sage.modules
29+
sage: S.interact() # indirect doctest # needs sage.graphs sage.modules sage.symbolic
3030
...VBox(children=...
3131
"""
3232
if kind not in ['seed', 'quiver']:

src/sage/combinat/cluster_algebra_quiver/mutation_class.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ def _principal_part(mat):
4242
EXAMPLES::
4343
4444
sage: from sage.combinat.cluster_algebra_quiver.mutation_class import _principal_part
45-
sage: M = Matrix([[1,2],[3,4],[5,6]]); M # optional - sage.modules
45+
sage: M = Matrix([[1,2],[3,4],[5,6]]); M # needs sage.modules
4646
[1 2]
4747
[3 4]
4848
[5 6]
49-
sage: _principal_part(M) # optional - sage.modules
49+
sage: _principal_part(M) # needs sage.modules
5050
[1 2]
5151
[3 4]
5252
"""
@@ -160,7 +160,7 @@ def _matrix_to_digraph( M ):
160160
EXAMPLES::
161161
162162
sage: from sage.combinat.cluster_algebra_quiver.mutation_class import _matrix_to_digraph
163-
sage: _matrix_to_digraph(matrix(3,[0,1,0,-1,0,-1,0,1,0])) # optional - sage.modules
163+
sage: _matrix_to_digraph(matrix(3,[0,1,0,-1,0,-1,0,1,0])) # needs sage.modules
164164
Digraph on 3 vertices
165165
"""
166166
n = M.ncols()
@@ -453,7 +453,7 @@ def _dig6_to_matrix( dig6 ):
453453
sage: from sage.combinat.cluster_algebra_quiver.quiver import ClusterQuiver
454454
sage: dg = ClusterQuiver(['A',4]).digraph()
455455
sage: data = _digraph_to_dig6(dg)
456-
sage: _dig6_to_matrix(data) # optional - sage.modules
456+
sage: _dig6_to_matrix(data) # needs sage.modules
457457
[ 0 1 0 0]
458458
[-1 0 -1 0]
459459
[ 0 1 0 1]

src/sage/combinat/cluster_algebra_quiver/mutation_type.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ def is_mutation_finite(M, nr_of_checks=None):
5656
sage: from sage.combinat.cluster_algebra_quiver.mutation_type import is_mutation_finite
5757
5858
sage: Q = ClusterQuiver(['A',10])
59-
sage: M = Q.b_matrix() # optional - sage.modules
60-
sage: is_mutation_finite(M) # optional - sage.modules
59+
sage: M = Q.b_matrix() # needs sage.modules
60+
sage: is_mutation_finite(M) # needs sage.modules
6161
(True, None)
6262
6363
sage: Q = ClusterQuiver([(0,1),(1,2),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8),(2,9)])
64-
sage: M = Q.b_matrix() # optional - sage.modules
65-
sage: is_mutation_finite(M) # random # optional - sage.modules
64+
sage: M = Q.b_matrix() # needs sage.modules
65+
sage: is_mutation_finite(M) # random # needs sage.modules
6666
(False, [9, 6, 9, 8, 9, 4, 0, 4, 5, 2, 1, 0, 1, 0, 7, 1, 9, 2, 5, 7, 8, 6, 3, 0, 2, 5, 4, 2, 6, 9, 2, 7, 3, 5, 3, 7, 9, 5, 9, 0, 2, 7, 9, 2, 4, 2, 1, 6, 9, 4, 3, 5, 0, 8, 2, 9, 5, 3, 7, 0, 1, 8, 3, 7, 2, 7, 3, 4, 8, 0, 4, 9, 5, 2, 8, 4, 8, 1, 7, 8, 9, 1, 5, 0, 8, 7, 4, 8, 9, 8, 0, 7, 4, 7, 1, 2, 8, 6, 1, 3, 9, 3, 9, 1, 3, 2, 4, 9, 5, 1, 2, 9, 4, 8, 5, 3, 4, 6, 8, 9, 2, 5, 9, 4, 6, 2, 1, 4, 9, 6, 0, 9, 8, 0, 4, 7, 9, 2, 1, 6])
6767
6868
Check that :trac:`19495` is fixed::
6969
70-
sage: dg = DiGraph(); dg.add_vertex(0); S = ClusterSeed(dg); S # optional - sage.modules
70+
sage: dg = DiGraph(); dg.add_vertex(0); S = ClusterSeed(dg); S # needs sage.modules
7171
A seed for a cluster algebra of rank 1
72-
sage: S.is_mutation_finite() # optional - sage.modules
72+
sage: S.is_mutation_finite() # needs sage.modules
7373
True
7474
"""
7575
import random
@@ -1429,7 +1429,7 @@ def _random_tests(mt, k, mut_class=None, nr_mut=5):
14291429
TESTS::
14301430
14311431
sage: from sage.combinat.cluster_algebra_quiver.mutation_type import _random_tests
1432-
sage: _random_tests( ['A',3], 1) # optional - sage.modules
1432+
sage: _random_tests( ['A',3], 1) # needs sage.modules
14331433
testing ['A', 3]
14341434
"""
14351435
from sage.combinat.cluster_algebra_quiver.quiver import ClusterQuiver

src/sage/combinat/cluster_algebra_quiver/quiver.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -548,11 +548,11 @@ def plot(self, circular=True, center=(0, 0), directed=True, mark=None,
548548
EXAMPLES::
549549
550550
sage: Q = ClusterQuiver(['A',5])
551-
sage: Q.plot() # optional - sage.plot sage.symbolic
551+
sage: Q.plot() # needs sage.plot sage.symbolic
552552
Graphics object consisting of 15 graphics primitives
553-
sage: Q.plot(circular=True) # optional - sage.plot sage.symbolic
553+
sage: Q.plot(circular=True) # needs sage.plot sage.symbolic
554554
Graphics object consisting of 15 graphics primitives
555-
sage: Q.plot(circular=True, mark=1) # optional - sage.plot sage.symbolic
555+
sage: Q.plot(circular=True, mark=1) # needs sage.plot sage.symbolic
556556
Graphics object consisting of 15 graphics primitives
557557
"""
558558
from sage.plot.colors import rainbow
@@ -699,7 +699,7 @@ def interact(self, fig_size=1, circular=True):
699699
TESTS::
700700
701701
sage: S = ClusterQuiver(['A',4])
702-
sage: S.interact() # optional - sage.plot sage.symbolic
702+
sage: S.interact() # needs sage.plot sage.symbolic
703703
...VBox(children=...
704704
"""
705705
return cluster_interact(self, fig_size, circular, kind="quiver")
@@ -717,7 +717,7 @@ def save_image(self, filename, circular=False):
717717
718718
sage: Q = ClusterQuiver(['F',4,[1,2]])
719719
sage: import tempfile
720-
sage: with tempfile.NamedTemporaryFile(suffix=".png") as f: # optional - sage.plot sage.symbolic
720+
sage: with tempfile.NamedTemporaryFile(suffix=".png") as f: # needs sage.plot sage.symbolic
721721
....: Q.save_image(f.name)
722722
"""
723723
graph_plot = self.plot(circular=circular)
@@ -742,7 +742,7 @@ def qmu_save(self, filename=None):
742742
743743
sage: Q = ClusterQuiver(['F',4,[1,2]])
744744
sage: import tempfile
745-
sage: with tempfile.NamedTemporaryFile(suffix=".qmu") as f: # optional - sage.plot sage.symbolic
745+
sage: with tempfile.NamedTemporaryFile(suffix=".qmu") as f: # needs sage.plot sage.symbolic
746746
....: Q.qmu_save(f.name)
747747
748748
Make sure we can save quivers with `m != n` frozen variables, see :trac:`14851`::
@@ -751,7 +751,7 @@ def qmu_save(self, filename=None):
751751
sage: T1 = S.principal_extension()
752752
sage: Q = T1.quiver()
753753
sage: import tempfile
754-
sage: with tempfile.NamedTemporaryFile(suffix=".qmu") as f: # optional - sage.plot sage.symbolic
754+
sage: with tempfile.NamedTemporaryFile(suffix=".qmu") as f: # needs sage.plot sage.symbolic
755755
....: Q.qmu_save(f.name)
756756
"""
757757
M = self.b_matrix()

src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,8 @@ def plot(self, circular=False, directed=True):
689689
EXAMPLES::
690690
691691
sage: QMT = QuiverMutationType(['A',5])
692-
sage: pl = QMT.plot() # optional - sage.plot sage.symbolic
693-
sage: pl = QMT.plot(circular=True) # optional - sage.plot sage.symbolic
692+
sage: pl = QMT.plot() # needs sage.plot sage.symbolic
693+
sage: pl = QMT.plot(circular=True) # needs sage.plot sage.symbolic
694694
"""
695695
return self.standard_quiver().plot(circular=circular, directed=directed)
696696

@@ -709,7 +709,7 @@ def show(self, circular=False, directed=True):
709709
TESTS::
710710
711711
sage: QMT = QuiverMutationType(['A',5])
712-
sage: QMT.show() # long time # optional - sage.plot sage.symbolic
712+
sage: QMT.show() # long time # needs sage.plot sage.symbolic
713713
"""
714714
self.plot(circular=circular, directed=directed).show()
715715

@@ -788,7 +788,7 @@ def b_matrix(self):
788788
789789
sage: mut_type = QuiverMutationType(['A',5]); mut_type
790790
['A', 5]
791-
sage: mut_type.b_matrix() # optional - sage.modules
791+
sage: mut_type.b_matrix() # needs sage.modules
792792
[ 0 1 0 0 0]
793793
[-1 0 -1 0 0]
794794
[ 0 1 0 1 0]
@@ -797,7 +797,7 @@ def b_matrix(self):
797797
798798
sage: mut_type = QuiverMutationType(['A',3],['B',3]); mut_type
799799
[ ['A', 3], ['B', 3] ]
800-
sage: mut_type.b_matrix() # optional - sage.modules
800+
sage: mut_type.b_matrix() # needs sage.modules
801801
[ 0 1 0 0 0 0]
802802
[-1 0 -1 0 0 0]
803803
[ 0 1 0 0 0 0]
@@ -854,7 +854,7 @@ def cartan_matrix(self):
854854
855855
sage: mut_type = QuiverMutationType(['A',5]); mut_type
856856
['A', 5]
857-
sage: mut_type.cartan_matrix() # optional - sage.modules
857+
sage: mut_type.cartan_matrix() # needs sage.modules
858858
[ 2 -1 0 0 0]
859859
[-1 2 -1 0 0]
860860
[ 0 -1 2 -1 0]
@@ -863,7 +863,7 @@ def cartan_matrix(self):
863863
864864
sage: mut_type = QuiverMutationType(['A',3],['B',3]); mut_type
865865
[ ['A', 3], ['B', 3] ]
866-
sage: mut_type.cartan_matrix() # optional - sage.modules
866+
sage: mut_type.cartan_matrix() # needs sage.modules
867867
[ 2 -1 0 0 0 0]
868868
[-1 2 -1 0 0 0]
869869
[ 0 -1 2 0 0 0]
@@ -2438,17 +2438,17 @@ def _edge_list_to_matrix(edges, nlist, mlist) -> matrix:
24382438
24392439
sage: from sage.combinat.cluster_algebra_quiver.quiver_mutation_type import _edge_list_to_matrix
24402440
sage: G = QuiverMutationType(['A', 2])._digraph
2441-
sage: _edge_list_to_matrix(G.edges(sort=True), [0, 1], []) # optional - sage.modules
2441+
sage: _edge_list_to_matrix(G.edges(sort=True), [0, 1], []) # needs sage.modules
24422442
[ 0 1]
24432443
[-1 0]
24442444
24452445
sage: G2 = DiGraph([('a', 'b', 1)])
2446-
sage: _edge_list_to_matrix(G2.edges(sort=True), ['a', 'b'], []) # optional - sage.modules
2446+
sage: _edge_list_to_matrix(G2.edges(sort=True), ['a', 'b'], []) # needs sage.modules
24472447
[ 0 1]
24482448
[-1 0]
24492449
24502450
sage: G3 = DiGraph([('a', 'b', 1), ('b', 'c', 1)])
2451-
sage: _edge_list_to_matrix(G3.edges(sort=True), ['a', 'b'], ['c']) # optional - sage.modules
2451+
sage: _edge_list_to_matrix(G3.edges(sort=True), ['a', 'b'], ['c']) # needs sage.modules
24522452
[ 0 1]
24532453
[-1 0]
24542454
[ 0 -1]

0 commit comments

Comments
 (0)