Skip to content

Commit dc17b6c

Browse files
committed
Docstring edits
Work in `libs`.
1 parent 9c9ec6d commit dc17b6c

83 files changed

Lines changed: 2890 additions & 4597 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/sage/combinat/debruijn_sequence.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ from sage.rings.integer_ring import ZZ
194194

195195
class DeBruijnSequences(UniqueRepresentation, Parent):
196196
r"""
197-
Represents the De Bruijn sequences of given parameters `k` and `n`.
197+
Represent the De Bruijn sequences of given parameters `k` and `n`.
198198
199199
A De Bruijn sequence of parameters `k` and `n` is defined as the shortest
200200
cyclic sequence that incorporates all substrings of length `n` a `k`-ary

src/sage/combinat/finite_state_machine.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,7 +2326,7 @@ def deepcopy(self, memo=None):
23262326

23272327
def _repr_(self):
23282328
"""
2329-
Represents a transitions as from state to state and input, output.
2329+
Represent a transitions as from state to state and input, output.
23302330

23312331
INPUT:
23322332

@@ -4093,7 +4093,7 @@ def default_is_zero(expression):
40934093

40944094
def _repr_(self):
40954095
"""
4096-
Represents the finite state machine as "Finite state machine
4096+
Represent the finite state machine as "Finite state machine
40974097
with n states" where n is the number of states.
40984098

40994099
INPUT:
@@ -10779,7 +10779,7 @@ def __init__(self, *args, **kwargs):
1077910779

1078010780
def _repr_(self):
1078110781
"""
10782-
Represents the finite state machine as "Automaton with n
10782+
Represent the finite state machine as "Automaton with n
1078310783
states" where n is the number of states.
1078410784

1078510785
INPUT:
@@ -11955,7 +11955,7 @@ class Transducer(FiniteStateMachine):
1195511955

1195611956
def _repr_(self):
1195711957
"""
11958-
Represents the transducer as "Transducer with n states" where
11958+
Represent the transducer as "Transducer with n states" where
1195911959
n is the number of states.
1196011960

1196111961
INPUT:

src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset, int_cmp
2626
def is_isomorphic(self, other):
2727
r"""
2828
Return the bijection as a permutation if two lists are isomorphic, return
29-
False otherwise.
29+
``False`` otherwise.
3030
3131
EXAMPLES::
3232

src/sage/interfaces/magma.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,8 @@ def _instancedoc_(self):
17751775

17761776
def is_MagmaElement(x):
17771777
"""
1778-
Return ``True`` if ``x`` is of type :class:`MagmaElement`, and False otherwise.
1778+
Return ``True`` if ``x`` is of type :class:`MagmaElement`, and ``False``
1779+
otherwise.
17791780
17801781
INPUT:
17811782

src/sage/libs/braiding.pyx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ def conjugatingbraid(braid1, braid2):
6666
sage: c = B([1,2])
6767
sage: conjugatingbraid(b,c)
6868
[[0], [2]]
69-
7069
"""
7170
nstrands = max(braid1.parent().strands(), braid2.parent().strands())
7271
l1 = braid1.Tietze()
@@ -98,7 +97,6 @@ def leftnormalform(braid):
9897
sage: b = B([1,2,1,-2])
9998
sage: leftnormalform(b)
10099
[[0], [2, 1]]
101-
102100
"""
103101
nstrands = braid.parent().strands()
104102
l1 = braid.Tietze()
@@ -129,7 +127,6 @@ def rightnormalform(braid):
129127
sage: b = B([1,2,1,-2])
130128
sage: rightnormalform(b)
131129
[[2, 1], [0]]
132-
133130
"""
134131
nstrands = braid.parent().strands()
135132
l1 = braid.Tietze()
@@ -148,7 +145,7 @@ def greatestcommondivisor(braid1, braid2):
148145
- ``braid1`` -- a braid
149146
- ``braid2`` -- a braid
150147
151-
OUTPUT: a list of lists representing the gcd of ``braid1`` and ``braid2``
148+
OUTPUT: list of lists representing the gcd of ``braid1`` and ``braid2``
152149
153150
EXAMPLES::
154151
@@ -158,7 +155,6 @@ def greatestcommondivisor(braid1, braid2):
158155
sage: b2 = B([2, 2, 2])
159156
sage: greatestcommondivisor(b1, b2)
160157
[[-1], [2, 1]]
161-
162158
"""
163159
nstrands = max(braid1.parent().strands(), braid2.parent().strands())
164160
l1 = braid1.Tietze()
@@ -178,7 +174,7 @@ def leastcommonmultiple(braid1, braid2):
178174
- ``braid1`` -- a braid
179175
- ``braid2`` -- a braid
180176
181-
OUTPUT: a list of lists representing the lcm of ``braid1`` and ``braid2``
177+
OUTPUT: list of lists representing the lcm of ``braid1`` and ``braid2``
182178
183179
EXAMPLES::
184180
@@ -218,7 +214,6 @@ def centralizer(braid):
218214
sage: b = B([1,2,-1])
219215
sage: centralizer(b)
220216
[[[-1], [2, 1], [1, 2]], [[0], [1], [1, 2], [2]]]
221-
222217
"""
223218
nstrands = braid.parent().strands()
224219
lnf = leftnormalform(braid)
@@ -244,7 +239,7 @@ def supersummitset(braid):
244239
245240
- ``braid`` -- a braid
246241
247-
OUTPUT: a list of lists representing the super summit set of ``braid``
242+
OUTPUT: list of lists representing the super summit set of ``braid``
248243
249244
EXAMPLES::
250245
@@ -253,7 +248,6 @@ def supersummitset(braid):
253248
sage: b = B([1,2,-1])
254249
sage: supersummitset(b)
255250
[[[0], [2]], [[0], [1]]]
256-
257251
"""
258252
nstrands = braid.parent().strands()
259253
l = braid.Tietze()
@@ -348,7 +342,6 @@ def rigidity(braid):
348342
sage: c = B([1,1,1,2,2])
349343
sage: rigidity(c)
350344
3
351-
352345
"""
353346
nstrands = braid.parent().strands()
354347
l = braid.Tietze()

src/sage/libs/coxeter3/coxeter.pyx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ cdef class String:
5555

5656
def __hash__(self):
5757
"""
58-
Return the hash of this String
58+
Return the hash of this String.
5959
6060
This is the hash of the tuple consisting of the class name and
6161
the name of this type.
@@ -595,9 +595,7 @@ cdef class CoxGroup(SageObject):
595595
596596
- ``w`` -- a word for an element of ``self``, not necessarily reduced
597597
598-
OUTPUT:
599-
600-
- a reduced expression for ``w``
598+
OUTPUT: a reduced expression for ``w``
601599
602600
EXAMPLES::
603601
@@ -623,7 +621,6 @@ cdef class CoxGroup(SageObject):
623621
[2 3 1 3 2]
624622
[2 2 3 1 3]
625623
[2 2 2 3 1]
626-
627624
"""
628625
from sage.matrix.constructor import matrix
629626
rank = self.rank()
@@ -750,13 +747,12 @@ cdef class CoxGroupElement:
750747
sage: w = W([1,2,3])
751748
sage: w.parent_group()
752749
Coxeter group of type A and rank 5
753-
754750
"""
755751
return self._parent_group
756752

757753
def __getitem__(self, i):
758754
"""
759-
Return the `i^{th}` entry of this element.
755+
Return the `i`-th entry of this element.
760756
761757
EXAMPLES::
762758
@@ -798,7 +794,6 @@ cdef class CoxGroupElement:
798794
sage: W = CoxGroup(['A',5])
799795
sage: w = W([1,2,3]); w
800796
[1, 2, 3]
801-
802797
"""
803798
return repr(list(self))
804799

@@ -1006,7 +1001,6 @@ cdef class CoxGroupElement:
10061001
[2, 1, 2]
10071002
sage: w.normal_form()
10081003
[1, 2, 1]
1009-
10101004
"""
10111005
cdef CoxGroupElement res = self._new()
10121006
self.group.normalForm(res.word)

src/sage/libs/coxeter3/coxeter_group.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def __classcall__(cls, cartan_type, *args, **options):
3636
Coxeter group of type ['B', 2] implemented by Coxeter3
3737
sage: CoxeterGroup(CartanType(['B', 3]).relabel({1: 3, 2: 2, 3: 1}))
3838
Coxeter group of type ['B', 3] relabelled by {1: 3, 2: 2, 3: 1} implemented by Coxeter3
39-
4039
"""
4140
from sage.combinat.root_system.cartan_type import CartanType
4241
ct = CartanType(cartan_type)
@@ -146,7 +145,6 @@ def one(self):
146145
sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
147146
sage: W.one()
148147
[]
149-
150148
"""
151149
return self.element_class(self, [])
152150

@@ -194,7 +192,7 @@ def rank(self):
194192

195193
def is_finite(self):
196194
"""
197-
Return True if this is a finite Coxeter group.
195+
Return ``True`` if this is a finite Coxeter group.
198196
199197
EXAMPLES::
200198
@@ -216,7 +214,6 @@ def length(self, x):
216214
2
217215
sage: W.length(W([1,1]))
218216
0
219-
220217
"""
221218
return x.length()
222219

@@ -237,7 +234,6 @@ def coxeter_matrix(self):
237234
[2 3 1]
238235
sage: m.index_set() == W.index_set()
239236
True
240-
241237
"""
242238
return CoxeterMatrix(self._coxgroup.coxeter_matrix(), self.index_set())
243239

@@ -265,7 +261,6 @@ def _an_element_(self):
265261
sage: W = CoxeterGroup(['A', 3], implementation='coxeter3')
266262
sage: W._an_element_()
267263
[]
268-
269264
"""
270265
return self.element_class(self, [])
271266

@@ -293,8 +288,9 @@ def kazhdan_lusztig_polynomial(self, u, v, constant_term_one=True):
293288
INPUT:
294289
295290
- ``u``, ``v`` -- elements of the underlying Coxeter group
296-
- ``constant_term_one`` -- (default: ``True``) True uses the constant equals one convention,
297-
False uses the Leclerc-Thibon convention
291+
- ``constant_term_one`` -- boolean (default: ``True``); ``True`` uses
292+
the constant equals one convention, ``False`` uses the Leclerc-Thibon
293+
convention
298294
299295
.. SEEALSO::
300296
@@ -345,7 +341,7 @@ def kazhdan_lusztig_polynomial(self, u, v, constant_term_one=True):
345341
We check that Coxeter3 and Sage's implementation give the same results::
346342
347343
sage: C = CoxeterGroup(['B', 3], implementation='coxeter3')
348-
sage: W = WeylGroup("B3",prefix="s")
344+
sage: W = WeylGroup("B3",prefix='s')
349345
sage: [s1,s2,s3] = W.simple_reflections()
350346
sage: R.<q> = LaurentPolynomialRing(QQ)
351347
sage: KL = KazhdanLusztigPolynomial(W,q)
@@ -540,7 +536,6 @@ def __getitem__(self, i):
540536
1
541537
sage: w0[1]
542538
2
543-
544539
"""
545540
# Allow the error message to be raised by the underlying element
546541
return self.value[i]
@@ -625,7 +620,7 @@ def has_right_descent(self, i):
625620

626621
def has_left_descent(self, i):
627622
"""
628-
Return True if ``i`` is a left descent of this element.
623+
Return ``True`` if ``i`` is a left descent of this element.
629624
630625
EXAMPLES::
631626

0 commit comments

Comments
 (0)