Skip to content

Commit

Permalink
Docstring edits
Browse files Browse the repository at this point in the history
Remove redundant spaces, indefinite articles, and trailing dots.
Up to `combinat`.
  • Loading branch information
gmou3 committed Jun 16, 2024
1 parent fa498ef commit 5adb22a
Show file tree
Hide file tree
Showing 106 changed files with 705 additions and 744 deletions.
2 changes: 1 addition & 1 deletion src/sage/algebras/affine_nil_temperley_lieb.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AffineNilTemperleyLiebTypeA(CombinatorialFreeModule):
INPUT:
- ``n`` -- a positive integer
- ``n`` -- positive integer
The affine nilTemperley Lieb algebra is generated by `a_i` for `i=0,1,\ldots,n-1`
subject to the relations `a_i a_i = a_i a_{i+1} a_i = a_{i+1} a_i a_{i+1} = 0` and
Expand Down
11 changes: 6 additions & 5 deletions src/sage/algebras/cluster_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1991,12 +1991,13 @@ def F_polynomial(self, g_vector):

def find_g_vector(self, g_vector, depth=infinity):
r"""
Return a mutation sequence to obtain a seed containing the g-vector ``g_vector`` from the initial seed.
Return a mutation sequence to obtain a seed containing the g-vector
``g_vector`` from the initial seed.
INPUT:
- ``g_vector`` -- tuple; the g-vector to find
- ``depth`` -- a positive integer or infinity (default: ``infinity``);
- ``depth`` -- positive integer or infinity (default: ``infinity``);
the maximum distance from ``self.current_seed`` to reach
OUTPUT:
Expand Down Expand Up @@ -2222,7 +2223,7 @@ def seeds(self, **kwargs):
- ``allowed_directions`` -- iterable of integers
(default: ``range(self.rank())``); the directions in which to mutate
- ``depth`` -- a positive integer or infinity (default: ``infinity``);
- ``depth`` -- positive integer or infinity (default: ``infinity``);
the maximum depth at which to stop searching
- ``catch_KeyboardInterrupt`` -- boolean (default: ``False``); whether to
Expand Down Expand Up @@ -2344,7 +2345,7 @@ def explore_to_depth(self, depth):
INPUT:
- ``depth`` -- a positive integer or infinity; the maximum depth
- ``depth`` -- positive integer or infinity; the maximum depth
at which to stop searching
EXAMPLES::
Expand All @@ -2371,7 +2372,7 @@ def cluster_fan(self, depth=infinity):
INPUT:
- ``depth`` -- a positive integer or infinity (default: ``infinity``);
- ``depth`` -- positive integer or infinity (default: ``infinity``);
the maximum depth at which to compute
EXAMPLES::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/fusion_rings/fusion_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class FusionRing(WeylCharacterRing):
INPUT:
- ``ct`` -- the Cartan type of a simple (finite-dimensional) Lie algebra
- ``k`` -- a nonnegative integer
- ``k`` -- nonnegative integer
- ``conjugate`` -- (default: ``False``) set ``True`` to obtain
the complex conjugate ring
- ``cyclotomic_order`` -- (default: computed depending on ``ct`` and ``k``)
Expand Down Expand Up @@ -1276,7 +1276,7 @@ def get_braid_generators(self,
- ``fusing_anyon`` -- a basis element of ``self``
- ``total_charge_anyon`` -- a basis element of ``self``
- ``n_strands`` -- a positive integer greater than 2
- ``n_strands`` -- positive integer greater than 2
- ``checkpoint`` -- boolean (default: ``False``);
whether the F-matrix solver should pickle checkpoints
- ``save_results`` -- (optional) a string indicating the name of
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/lie_algebras/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def pwitt(R, p):
INPUT:
- ``R`` -- the base ring
- ``p`` -- a positive integer that is `0` in ``R``
- ``p`` -- positive integer that is `0` in `R`
EXAMPLES::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AbelianLieConformalAlgebra(GradedLieConformalAlgebra):
- ``R`` -- a commutative ring; the base ring of this Lie
conformal algebra
- ``ngens`` -- a positive integer (default: `1`); the number
- ``ngens`` -- positive integer (default: `1`); the number
of generators of this Lie conformal algebra
- ``weights`` -- list of positive rational numbers (default:
`1` for each generator); the weights of the generators. The resulting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class LieConformalAlgebraWithStructureCoefficients(
list.
- ``parity`` -- tuple of `0` or `1` (default: tuple of `0`);
a tuple specifying the parity of each non-central generator
a tuple specifying the parity of each non-central generator
EXAMPLES:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/nil_coxeter_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def homogeneous_generator_noncommutative_variables(self, r):
INPUT:
- ``r`` -- a positive integer at most the rank of the Weyl group
- ``r`` -- positive integer at most the rank of the Weyl group
EXAMPLES::
Expand Down
6 changes: 2 additions & 4 deletions src/sage/algebras/schur_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,13 +541,11 @@ def GL_irreducible_character(n, mu, KK):
INPUT:
- ``n`` -- a positive integer
- ``n`` -- positive integer
- ``mu`` -- a partition of at most ``n`` parts
- ``KK`` -- a field
OUTPUT:
a symmetric function which should be interpreted in ``n``
OUTPUT: a symmetric function which should be interpreted in ``n``
variables to be meaningful as a character
EXAMPLES:
Expand Down
39 changes: 19 additions & 20 deletions src/sage/arith/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ def eratosthenes(n):
INPUT:
- ``n`` -- a positive integer
- ``n`` -- positive integer
OUTPUT: list of primes less than or equal to `n`
Expand Down Expand Up @@ -2459,9 +2459,9 @@ def trial_division(n, bound=None):
INPUT:
- ``n`` -- a positive integer
- ``n`` -- positive integer
- ``bound`` -- (optional) a positive integer
- ``bound`` -- (optional) positive integer
OUTPUT: a prime ``p=bound`` that divides `n`, or `n` if
there is no such prime
Expand Down Expand Up @@ -2523,12 +2523,12 @@ def factor(n, proof=None, int_=False, algorithm='pari', verbose=0, **kwds):
INPUT:
- ``n`` -- a nonzero integer
- ``n`` -- nonzero integer
- ``proof`` -- boolean or ``None`` (default: ``None``)
- ``int_`` -- boolean (default: ``False``); whether to return
answers as Python integers
answers as Python integers
- ``algorithm`` -- string
Expand All @@ -2540,8 +2540,8 @@ def factor(n, proof=None, int_=False, algorithm='pari', verbose=0, **kwds):
- ``'magma'`` -- use Magma (requires magma be installed)
- ``verbose`` -- integer (default: 0); PARI's debug
variable is set to this; e.g., set to 4 or 8 to see lots of output
during factorization.
variable is set to this. E.g., set to 4 or 8 to see lots of output
during factorization.
OUTPUT: factorization of `n`
Expand Down Expand Up @@ -3116,8 +3116,7 @@ def plot(self, xmin=1, xmax=50, pointsize=30, rgbcolor=(0, 0, 1),
- ``rgbcolor`` -- default: (0,0,1)
- ``join`` -- boolean (default: ``True``); whether to join the
points
- ``join`` -- boolean (default: ``True``); whether to join the points
- ``**kwds`` -- passed on
Expand Down Expand Up @@ -3150,7 +3149,7 @@ def carmichael_lambda(n):
INPUT:
- ``n`` -- a positive integer
- ``n`` -- positive integer
OUTPUT: the Carmichael function of ``n``
Expand Down Expand Up @@ -3538,7 +3537,7 @@ def CRT_basis(moduli):
INPUT:
- ``moduli`` -- list of pairwise coprime moduli `m` which admit an
extended Euclidean algorithm
extended Euclidean algorithm
OUTPUT:
Expand Down Expand Up @@ -3588,7 +3587,7 @@ def CRT_vectors(X, moduli):
INPUT:
- ``X`` -- list or tuple, consisting of lists/tuples/vectors/etc of
integers of the same length
integers of the same length
- ``moduli`` -- list of len(X) moduli
OUTPUT: ``list`` -- application of CRT componentwise
Expand Down Expand Up @@ -3633,7 +3632,7 @@ def binomial(x, m, **kwds):
INPUT:
- ``x``, ``m`` -- numbers or symbolic expressions; either ``m``
or ``x-m`` must be an integer
or ``x-m`` must be an integer
OUTPUT: number or symbolic expression (if input is symbolic)
Expand Down Expand Up @@ -4268,7 +4267,7 @@ def primitive_root(n, check=True):
INPUT:
- ``n`` -- a nonzero integer
- ``n`` -- nonzero integer
- ``check`` -- boolean (default: ``True``); if ``False``, then `n` is assumed
to be a positive integer possessing a primitive root, and behavior
is undefined otherwise.
Expand Down Expand Up @@ -4384,7 +4383,7 @@ def nth_prime(n):
INPUT:
- ``n`` -- a positive integer
- ``n`` -- positive integer
OUTPUT: the `n`-th prime number
Expand Down Expand Up @@ -4727,7 +4726,7 @@ def number_of_divisors(n):
INPUT:
- ``n`` -- a nonzero integer
- ``n`` -- nonzero integer
OUTPUT: integer; the number of divisors of `n`
Expand Down Expand Up @@ -4765,7 +4764,7 @@ def hilbert_symbol(a, b, p, algorithm='pari'):
- ``a``, ``b`` -- integers
- ``p`` -- integer; either prime or -1 (which
represents the archimedean place)
represents the archimedean place)
- ``algorithm`` -- string
Expand Down Expand Up @@ -5243,7 +5242,7 @@ def integer_floor(x):
INPUT:
- ``x`` -- an object that has a floor method or is
coercible to integer
coercible to integer
OUTPUT: integer
Expand Down Expand Up @@ -5650,7 +5649,7 @@ def sum_of_k_squares(k, n):
INPUT:
- ``k`` -- a nonnegative integer
- ``k`` -- nonnegative integer
- ``n`` -- integer
Expand Down Expand Up @@ -6289,7 +6288,7 @@ def dedekind_psi(N):
INPUT:
- ``N`` -- a positive integer
- ``N`` -- positive integer
OUTPUT: integer
Expand Down
10 changes: 5 additions & 5 deletions src/sage/calculus/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,13 @@ def limit(f, dir=None, taylor=False, **argv):
INPUT:
- ``dir`` -- (default: ``None``); dir may have the value
'plus' (or 'above') for a limit from above, 'minus' (or 'below')
for a limit from below, or may be omitted (implying a two-sided
limit is to be computed).
'plus' (or 'above') for a limit from above, 'minus' (or 'below')
for a limit from below, or may be omitted (implying a two-sided
limit is to be computed).
- ``taylor`` -- (default: ``False``); if ``True``, use Taylor
series, which allows more limits to be computed (but may also
crash in some obscure cases due to bugs in Maxima).
series, which allows more limits to be computed (but may also
crash in some obscure cases due to bugs in Maxima).
- ``\*\*argv`` -- 1 named parameter
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/bialgebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def convolution_power_of_id(self, n):
INPUT:
- ``n`` -- a nonnegative integer
- ``n`` -- nonnegative integer
OUTPUT: the image of ``self`` under the convolution power `\mathrm{Id}^{*n}`
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/commutative_rings.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def frobenius_endomorphism(self, n=1):
INPUT:
- ``n`` -- a nonnegative integer (default: 1)
- ``n`` -- nonnegative integer (default: 1)
OUTPUT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def coproduct_on_basis(self, i):
INPUT:
- ``i`` -- a nonnegative integer
- ``i`` -- nonnegative integer
OUTPUT: an element of the tensor square of ``self``
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/finite_coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def m_cambrian_lattice(self, c, m=1, on_roots=False):
- ``c`` -- a Coxeter element of ``self`` (as a tuple, or
as an element of ``self``)
- ``m`` -- a positive integer (default: 1)
- ``m`` -- positive integer (default: 1)
- ``on_roots`` -- boolean (default: ``False``); if
``on_roots`` is ``True``, the lattice is realized on
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/finite_permutation_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def profile(self, n, using_polya=True):
INPUT:
- ``n`` -- a nonnegative integer
- ``n`` -- nonnegative integer
- ``using_polya`` -- boolean (default: ``True``); if ``True``, the
computation uses Pólya enumeration (and all values of the profile
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/modules_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def module_morphism(self, on_basis=None, matrix=None, function=None,
can be used (with care) to define affine maps.
Only meaningful with ``on_basis``.
- ``position`` -- a nonnegative integer specifying which
- ``position`` -- nonnegative integer specifying which
positional argument is used as the input of the function `f`
(default: 0); this is currently only used with ``on_basis``.
Expand Down
4 changes: 2 additions & 2 deletions src/sage/categories/monoids.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def _pow_int(self, n):
INPUT:
- ``n`` -- a nonnegative integer
- ``n`` -- nonnegative integer
EXAMPLES::
Expand All @@ -312,7 +312,7 @@ def _pow_naive(self, n):
INPUT:
- ``n`` -- a nonnegative integer
- ``n`` -- nonnegative integer
This naive implementation does not use binary
exponentiation; there are cases where this is actually
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/semigroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def _pow_int(self, n):
INPUT:
- ``n`` -- a positive integer
- ``n`` -- positive integer
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/weyl_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def stanley_symmetric_function_as_polynomial(self, max_length=None):
INPUT:
- ``self`` -- an element `w` of a Weyl group `W`
- ``max_length`` -- a nonnegative integer or infinity (default: infinity)
- ``max_length`` -- nonnegative integer or infinity (default: infinity)
Returns the generating series for the Pieri factorizations
`w = u_1 \cdots u_k`, where `u_i` is a Pieri factor for
Expand Down
2 changes: 1 addition & 1 deletion src/sage/coding/binary_code.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3145,7 +3145,7 @@ cdef class BinaryCodeClassifier:
INPUT:
- ``CC`` -- a BinaryCode object
- ``verbosity`` -- a nonnegative integer
- ``verbosity`` -- nonnegative integer
OUTPUT:
a tuple, (gens, labeling, size, base)
Expand Down
Loading

0 comments on commit 5adb22a

Please sign in to comment.