Skip to content

Commit 361ac0c

Browse files
author
Matthias Koeppe
committed
./sage -fixdoctests --only-tags src/sage/matroids/*.{py,pyx}
1 parent 5ef344d commit 361ac0c

File tree

4 files changed

+33
-28
lines changed

4 files changed

+33
-28
lines changed

src/sage/matroids/catalog.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -758,17 +758,18 @@ def CompleteGraphic(n):
758758
759759
EXAMPLES::
760760
761+
sage: # needs sage.graphs
761762
sage: from sage.matroids.advanced import setprint
762-
sage: M = matroids.CompleteGraphic(5); M # needs sage.graphs
763+
sage: M = matroids.CompleteGraphic(5); M
763764
M(K5): Graphic matroid of rank 4 on 10 elements
764-
sage: M.has_minor(matroids.Uniform(2, 4)) # needs sage.graphs
765+
sage: M.has_minor(matroids.Uniform(2, 4))
765766
False
766-
sage: simplify(M.contract(randrange(0, # needs sage.graphs
767+
sage: simplify(M.contract(randrange(0,
767768
....: 10))).is_isomorphic(matroids.CompleteGraphic(4))
768769
True
769-
sage: setprint(M.closure([0, 2, 4, 5])) # needs sage.graphs
770+
sage: setprint(M.closure([0, 2, 4, 5]))
770771
{0, 1, 2, 4, 5, 7}
771-
sage: M.is_valid() # needs sage.graphs
772+
sage: M.is_valid()
772773
True
773774
"""
774775
M = Matroid(groundset=list(range((n * (n - 1)) // 2)),

src/sage/matroids/matroid.pyx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3074,11 +3074,12 @@ cdef class Matroid(SageObject):
30743074
sage: G = SymmetricGroup(3); # needs sage.groups
30753075
sage: OSG = M.orlik_solomon_algebra(QQ, invariant=G) # needs sage.groups
30763076
3077-
sage: G = SymmetricGroup(4) # needs sage.groups
3077+
sage: # needs sage.groups
3078+
sage: G = SymmetricGroup(4)
30783079
sage: action = lambda g,x: g(x+1)-1
3079-
sage: OSG1 = M.orlik_solomon_algebra(QQ, invariant=(G,action)) # needs sage.groups
3080-
sage: OSG2 = M.orlik_solomon_algebra(QQ, invariant=(action,G)) # needs sage.groups
3081-
sage: OSG1 is OSG2 # needs sage.groups
3080+
sage: OSG1 = M.orlik_solomon_algebra(QQ, invariant=(G,action))
3081+
sage: OSG2 = M.orlik_solomon_algebra(QQ, invariant=(action,G))
3082+
sage: OSG1 is OSG2
30823083
True
30833084
30843085
"""

src/sage/matroids/unpickling.pyx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,13 @@ def unpickle_quaternary_matrix(version, data):
270270
271271
EXAMPLES::
272272
273+
sage: # needs sage.rings.finite_rings
273274
sage: from sage.matroids.lean_matrix import *
274-
sage: A = QuaternaryMatrix(2, 5, ring=GF(4, 'x')) # needs sage.rings.finite_rings
275-
sage: A == loads(dumps(A)) # indirect doctest # needs sage.rings.finite_rings
275+
sage: A = QuaternaryMatrix(2, 5, ring=GF(4, 'x'))
276+
sage: A == loads(dumps(A)) # indirect doctest
276277
True
277-
sage: C = QuaternaryMatrix(2, 2, Matrix(GF(4, 'x'), [[1, 1], [0, 1]])) # needs sage.rings.finite_rings
278-
sage: C == loads(dumps(C)) # needs sage.rings.finite_rings
278+
sage: C = QuaternaryMatrix(2, 2, Matrix(GF(4, 'x'), [[1, 1], [0, 1]]))
279+
sage: C == loads(dumps(C))
279280
True
280281
"""
281282
cdef QuaternaryMatrix A

src/sage/matroids/utilities.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -533,26 +533,27 @@ def lift_cross_ratios(A, lift_map=None):
533533
534534
EXAMPLES::
535535
536+
sage: # needs sage.graphs
536537
sage: from sage.matroids.advanced import lift_cross_ratios, lift_map, LinearMatroid
537-
sage: R = GF(7) # needs sage.graphs
538-
sage: to_sixth_root_of_unity = lift_map('sru') # needs sage.graphs sage.rings.number_field
539-
sage: A = Matrix(R, [[1, 0, 6, 1, 2],[6, 1, 0, 0, 1],[0, 6, 3, 6, 0]]) # needs sage.graphs
540-
sage: A # needs sage.graphs
538+
sage: R = GF(7)
539+
sage: to_sixth_root_of_unity = lift_map('sru') # needs sage.rings.number_field
540+
sage: A = Matrix(R, [[1, 0, 6, 1, 2],[6, 1, 0, 0, 1],[0, 6, 3, 6, 0]])
541+
sage: A
541542
[1 0 6 1 2]
542543
[6 1 0 0 1]
543544
[0 6 3 6 0]
544-
sage: Z = lift_cross_ratios(A, to_sixth_root_of_unity) # needs sage.graphs sage.rings.finite_rings sage.rings.number_field
545-
sage: Z # needs sage.graphs sage.rings.finite_rings sage.rings.number_field
545+
sage: Z = lift_cross_ratios(A, to_sixth_root_of_unity) # needs sage.rings.finite_rings sage.rings.number_field
546+
sage: Z # needs sage.rings.finite_rings sage.rings.number_field
546547
[ 1 0 1 1 1]
547548
[ 1 1 0 0 z]
548549
[ 0 -1 z 1 0]
549-
sage: M = LinearMatroid(reduced_matrix=A) # needs sage.graphs
550-
sage: sorted(M.cross_ratios()) # needs sage.graphs
550+
sage: M = LinearMatroid(reduced_matrix=A)
551+
sage: sorted(M.cross_ratios())
551552
[3, 5]
552-
sage: N = LinearMatroid(reduced_matrix=Z) # needs sage.graphs sage.rings.finite_rings sage.rings.number_field
553-
sage: sorted(N.cross_ratios()) # needs sage.graphs sage.rings.finite_rings sage.rings.number_field
553+
sage: N = LinearMatroid(reduced_matrix=Z) # needs sage.rings.finite_rings sage.rings.number_field
554+
sage: sorted(N.cross_ratios()) # needs sage.rings.finite_rings sage.rings.number_field
554555
[-z + 1, z]
555-
sage: M.is_isomorphism(N, {e:e for e in M.groundset()}) # needs sage.graphs sage.rings.finite_rings sage.rings.number_field
556+
sage: M.is_isomorphism(N, {e:e for e in M.groundset()}) # needs sage.rings.finite_rings sage.rings.number_field
556557
True
557558
558559
"""
@@ -752,14 +753,15 @@ def split_vertex(G, u, v=None, edges=None):
752753
753754
EXAMPLES::
754755
756+
sage: # needs sage.graphs
755757
sage: from sage.matroids.utilities import split_vertex
756-
sage: G = graphs.BullGraph() # needs sage.graphs
757-
sage: split_vertex(G, u=1, v=55, edges=[(1, 3)]) # needs sage.graphs
758+
sage: G = graphs.BullGraph()
759+
sage: split_vertex(G, u=1, v=55, edges=[(1, 3)])
758760
Traceback (most recent call last):
759761
...
760762
ValueError: the edges are not all incident with u
761-
sage: split_vertex(G, u=1, v=55, edges=[(1, 3, None)]) # needs sage.graphs
762-
sage: list(G.edges(sort=True)) # needs sage.graphs
763+
sage: split_vertex(G, u=1, v=55, edges=[(1, 3, None)])
764+
sage: list(G.edges(sort=True))
763765
[(0, 1, None), (0, 2, None), (1, 2, None), (2, 4, None), (3, 55, None)]
764766
"""
765767
if v is None:

0 commit comments

Comments
 (0)