@@ -106,15 +106,15 @@ def pad_right(T, length, zero=0):
106
106
107
107
INPUT:
108
108
109
- - ``T`` -- A tuple, list or other iterable.
109
+ - ``T`` -- A tuple, list or other iterable
110
110
111
- - ``length`` -- a nonnegative integer.
111
+ - ``length`` -- a nonnegative integer
112
112
113
- - ``zero`` -- (default: ``0``) the elements to pad with.
113
+ - ``zero`` -- (default: ``0``) the elements to pad with
114
114
115
115
OUTPUT:
116
116
117
- An object of the same type as ``T``.
117
+ An object of the same type as ``T``
118
118
119
119
EXAMPLES::
120
120
@@ -276,17 +276,16 @@ def __iter__(self):
276
276
from itertools import count
277
277
return iter (self [n ] for n in count ())
278
278
279
-
280
279
def subsequence (self , a , b , minimize = True ):
281
280
r"""
282
281
Return the subsequence with indices `an+b` of this
283
282
`k`-regular sequence.
284
283
285
284
INPUT:
286
285
287
- - ``a`` -- a nonnegative integer.
286
+ - ``a`` -- a nonnegative integer
288
287
289
- - ``b`` -- an integer.
288
+ - ``b`` -- an integer
290
289
291
290
Alternatively, this is allowed to be a dictionary
292
291
`b_j \mapsto c_j`. If so, the result will be the sum
@@ -297,7 +296,7 @@ def subsequence(self, a, b, minimize=True):
297
296
298
297
OUTPUT:
299
298
300
- A :class:`kRegularSequence`.
299
+ A :class:`kRegularSequence`
301
300
302
301
.. NOTE::
303
302
@@ -466,7 +465,6 @@ def mu_line(r, i, c):
466
465
else :
467
466
return result
468
467
469
-
470
468
def backward_differences (self , ** kwds ):
471
469
r"""
472
470
Return the sequence of backward differences of this
@@ -479,7 +477,7 @@ def backward_differences(self, **kwds):
479
477
480
478
OUTPUT:
481
479
482
- A :class:`kRegularSequence`.
480
+ A :class:`kRegularSequence`
483
481
484
482
.. NOTE::
485
483
@@ -506,7 +504,6 @@ def backward_differences(self, **kwds):
506
504
"""
507
505
return self .subsequence (1 , {0 : 1 , - 1 : - 1 }, ** kwds )
508
506
509
-
510
507
def forward_differences (self , ** kwds ):
511
508
r"""
512
509
Return the sequence of forward differences of this
@@ -519,7 +516,7 @@ def forward_differences(self, **kwds):
519
516
520
517
OUTPUT:
521
518
522
- A :class:`kRegularSequence`.
519
+ A :class:`kRegularSequence`
523
520
524
521
EXAMPLES::
525
522
@@ -542,7 +539,6 @@ def forward_differences(self, **kwds):
542
539
"""
543
540
return self .subsequence (1 , {1 : 1 , 0 : - 1 }, ** kwds )
544
541
545
-
546
542
def partial_sums (self , include_n = False , minimize = True ):
547
543
r"""
548
544
Return the sequence of partial sums of this
@@ -560,7 +556,7 @@ def partial_sums(self, include_n=False, minimize=True):
560
556
561
557
OUTPUT:
562
558
563
- A :class:`kRegularSequence`.
559
+ A :class:`kRegularSequence`
564
560
565
561
EXAMPLES::
566
562
0 commit comments