Skip to content

Commit

Permalink
Docstring edits
Browse files Browse the repository at this point in the history
Remove trailing dots, improve strings' formatting, more backticks, etc
  • Loading branch information
gmou3 committed Jun 10, 2024
1 parent 75b4801 commit 6922a4c
Show file tree
Hide file tree
Showing 100 changed files with 1,052 additions and 1,268 deletions.
2 changes: 1 addition & 1 deletion src/sage/algebras/fusion_rings/f_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ def get_fvars_by_size(self, n, indices=False):
INPUT:
- `n` -- a positive integer
- ``n`` -- positive integer
- ``indices`` -- boolean (default: ``False``)
If ``indices`` is ``False`` (default),
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/group_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def GroupAlgebra(G, R=IntegerRing()):
INPUT:
- `G` -- a group
- `R` -- (default: `\ZZ`) a ring
- ``G`` -- a group
- ``R`` -- (default: `\ZZ`) a ring
EXAMPLES:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/letterplace/free_algebra_letterplace.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ cdef class FreeAlgebra_letterplace(Parent):
INPUT:
- `i` -- an integer
- ``i`` -- integer
OUTPUT: the generator with index `i`
Expand Down
3 changes: 2 additions & 1 deletion src/sage/algebras/lie_algebras/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def Heisenberg(R, n, representation='structure'):
- ``R`` -- the base ring
- ``n`` -- the rank (a nonnegative integer or infinity)
- ``representation`` -- (default: "structure") can be one of the following:
- ``representation`` -- (default: ``'structure'``) can be one of the
following:
- ``'structure'`` -- using structure coefficients
- ``'matrix'`` -- using matrices
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/lie_algebras/verma_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ def _composition_(self, right, homset):
INPUT:
- ``self``, ``right`` -- maps
- homset -- a homset
- ``homset`` -- a homset
ASSUMPTION:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class FermionicGhostsLieConformalAlgebra(GradedLieConformalAlgebra):
- ``R`` -- a commutative ring; the base ring of this Lie
conformal algebra
- ``ngens`` -- an even positive Integer (default: ``2``); The
- ``ngens`` -- an even positive Integer (default: ``2``); the
number of non-central generators of this Lie conformal
algebra.
algebra
- ``names`` -- a tuple of ``str``; alternative names for the
generators
- ``index_set`` -- an enumerated set; alternative indexing
Expand Down
6 changes: 3 additions & 3 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ def modp_splitting_data(self, p):
INPUT:
- `p` -- unramified odd prime
- ``p`` -- unramified odd prime
OUTPUT: 2-tuple of matrices over finite field
Expand Down Expand Up @@ -1485,7 +1485,7 @@ def modp_splitting_map(self, p):
INPUT:
- `p` -- prime number
- ``p`` -- prime number
EXAMPLES::
Expand Down Expand Up @@ -3087,7 +3087,7 @@ def theta_series(self, B, var='q'):
INPUT:
- ``B`` -- positive integer
- ``var`` -- string (default: 'q')
- ``var`` -- string (default: ``'q'``)
OUTPUT: power series
Expand Down
15 changes: 8 additions & 7 deletions src/sage/algebras/quatalg/quaternion_algebra_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ cdef to_quaternion(R, x):
INPUT:
- R -- callable
- x -- element or 4-tuple
- ``R`` -- callable
- ``x`` -- element or 4-tuple
Given a callable R and an x that defines a quaternion, which can be a
4-tuple, list of length 4, or something that coerces to R, return
Expand All @@ -168,9 +168,9 @@ cdef inline print_coeff(y, i, bint atomic):
INPUT:
- y -- coefficient
- i -- string (name of a generator)
- atomic -- boolean int; whether or not elements of base ring
- ``y`` -- coefficient
- ``i`` -- string (name of a generator)
- ``atomic`` -- boolean int; whether or not elements of base ring
print atomically
EXAMPLES::
Expand Down Expand Up @@ -563,7 +563,8 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement):
INPUT:
- var -- string (default: 'x'); indeterminate of characteristic polynomial
- ``var`` -- string (default: ``'x'``); indeterminate of characteristic
polynomial
EXAMPLES::
Expand Down Expand Up @@ -592,7 +593,7 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement):
INPUT:
- ``action`` -- (default: 'right') 'right' or 'left'.
- ``action`` -- (default: ``'right'``) 'right' or 'left'.

This comment has been minimized.

Copy link
@kwankyu

kwankyu Jun 17, 2024

Collaborator
``'left'``
OUTPUT: a matrix
Expand Down
16 changes: 8 additions & 8 deletions src/sage/algebras/steenrod/steenrod_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def profile(self, i, component=0):
INPUT:
- `i` -- integer
- ``i`` -- integer
- ``component`` -- either 0 or 1 (default: 0)
OUTPUT: integer or `\infty`
Expand Down Expand Up @@ -1038,7 +1038,7 @@ def homogeneous_component(self, n):
INPUT:
- `n` -- integer
- ``n`` -- integer
OUTPUT: a vector space spanned by the basis for this algebra in dimension `n`
Expand Down Expand Up @@ -1720,7 +1720,7 @@ def milnor(self):
INPUT:
- x -- an element of this algebra
- ``x`` -- an element of this algebra
OUTPUT: x converted to the Milnor basis
Expand All @@ -1745,7 +1745,7 @@ def _change_basis_on_basis(self, t, basis='milnor'):
- ``t`` -- tuple, representing basis element in the current basis
- ``basis`` -- string, the basis to which to convert, optional
(default: 'milnor')
(default: ``'milnor'``)
OUTPUT: an element of the Steenrod algebra with basis ``basis``
Expand Down Expand Up @@ -1827,7 +1827,7 @@ def _change_basis(self, x, basis='milnor'):
- ``x`` -- an element of this algebra
- ``basis`` -- string, the basis to which to convert, optional
(default: 'milnor')
(default: ``'milnor'``)
OUTPUT: an element of the Steenrod algebra with basis ``basis``
Expand Down Expand Up @@ -2191,7 +2191,7 @@ def basis(self, d=None):
INPUT:
- `d` -- integer or ``None``, (default: ``None``)
- ``d`` -- integer or ``None`` (default: ``None``)
OUTPUT:
Expand Down Expand Up @@ -4185,8 +4185,8 @@ def AA(n=None, p=2):
INPUT:
- `n` -- nonnegative integer (default: ``None``)
- `p` -- prime number (default: 2)
- ``n`` -- nonnegative integer (default: ``None``)
- ``p`` -- prime number (default: 2)
OUTPUT:
Expand Down
14 changes: 7 additions & 7 deletions src/sage/algebras/steenrod/steenrod_algebra_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_basis_name(basis, p, generic=None):
- ``p`` -- positive prime number
- ``generic`` -- boolean, optional, default to 'None'
- ``generic`` -- boolean (default: 'None')
OUTPUT: ``basis_name`` -- string
Expand Down Expand Up @@ -195,9 +195,9 @@ def is_valid_profile(profile, truncation_type, p=2, generic=None):
- ``truncation_type`` -- either 0 or `\infty`
- `p` -- prime number (default: 2)
- ``p`` -- prime number (default: 2)
- `generic` -- boolean (default: ``None``)
- ``generic`` -- boolean (default: ``None``)
OUTPUT: ``True`` if the profile function is valid, False otherwise
Expand Down Expand Up @@ -304,10 +304,10 @@ def normalize_profile(profile, precision=None, truncation_type='auto', p=2, gene
INPUT:
- ``profile`` -- a profile function in form specified below
- ``precision`` -- integer or ``None``, optional, default ``None``
- ``truncation_type`` -- 0 or `\infty` or 'auto', optional, default 'auto'
- `p` -- prime, optional, default 2
- `generic` -- boolean, optional, default ``None``
- ``precision`` -- integer or ``None`` (default: ``None``)
- ``truncation_type`` -- 0 or `\infty` or 'auto' (default: 'auto')
- ``p`` -- prime (default: 2)
- ``generic`` -- boolean (default: ``None``)
OUTPUT:
Expand Down
26 changes: 13 additions & 13 deletions src/sage/algebras/steenrod/steenrod_algebra_mult.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ def milnor_multiplication(r,s):
INPUT:
- r -- tuple of nonnegative integers
- s -- tuple of nonnegative integers
- ``r`` -- tuple of nonnegative integers
- ``s`` -- tuple of nonnegative integers
OUTPUT:
Expand Down Expand Up @@ -324,7 +324,7 @@ def multinomial(list):
INPUT:
- list -- list of integers
- ``list`` -- list of integers
OUTPUT: none if the multinomial coefficient is 0, or sum of list if it is 1
Expand Down Expand Up @@ -378,10 +378,10 @@ def milnor_multiplication_odd(m1,m2,p):
INPUT:
- m1 -- pair of tuples (e,r), where e is an increasing tuple of
- ``m1`` -- pair of tuples (e,r), where e is an increasing tuple of
nonnegative integers and r is a tuple of nonnegative integers
- m2 -- pair of tuples (f,s), same format as m1
- p -- odd prime number
- ``m2`` -- pair of tuples (f,s), same format as m1
- ``p`` -- odd prime number
OUTPUT:
Expand Down Expand Up @@ -574,8 +574,8 @@ def multinomial_odd(list,p):
INPUT:
- list -- list of integers
- p -- a prime number
- ``list`` -- list of integers
- ``p`` -- a prime number
OUTPUT: associated multinomial coefficient, mod p
Expand Down Expand Up @@ -672,7 +672,7 @@ def binomial_modp(n,k,p):
INPUT:
- `n`, `k` -- integers
- `p` -- prime number
- ``p`` -- prime number
OUTPUT: `n` choose `k`, mod `p`
Expand All @@ -698,8 +698,8 @@ def adem(a, b, c=0, p=2, generic=None):
- `a`, `b`, `c` -- nonnegative integers (optional); corresponding
to either `P^a P^b` or (if `c` present) to `P^a \beta^b P^c`
- `p` -- positive prime number (default: 2)
- `generic` -- whether to use the generic Steenrod algebra, (default: depends on prime)
- ``p`` -- positive prime number (default: 2)
- ``generic`` -- whether to use the generic Steenrod algebra, (default: depends on prime)
OUTPUT:
Expand Down Expand Up @@ -847,8 +847,8 @@ def make_mono_admissible(mono, p=2, generic=None):
INPUT:
- ``mono`` -- a tuple of nonnegative integers
- `p` -- prime number (default: 2)
- `generic` -- whether to use the generic Steenrod algebra (default: depends on prime)
- ``p`` -- prime number (default: 2)
- ``generic`` -- whether to use the generic Steenrod algebra (default: depends on prime)
OUTPUT:
Expand Down
32 changes: 15 additions & 17 deletions src/sage/arith/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def factorial(n, algorithm='gmp'):
- ``n`` -- an integer
- ``algorithm`` -- string (default: 'gmp'):
- ``algorithm`` -- string (default: ``'gmp'``):
- ``'gmp'`` -- use the GMP C-library factorial function
Expand Down Expand Up @@ -934,9 +934,9 @@ def primes_first_n(n, leave_pari=False):
INPUT:
- `n` -- a nonnegative integer
- ``n`` -- nonnegative integer
OUTPUT: a list of the first `n` prime numbers
OUTPUT: list of the first `n` prime numbers
EXAMPLES::
Expand Down Expand Up @@ -1039,7 +1039,7 @@ def primes(start=2, stop=None, proof=None):
- ``stop`` -- integer (or infinity); upper (open) bound for the
primes
- ``proof`` -- bool or ``None`` (default: ``None``); If ``True``, the
- ``proof`` -- bool or ``None`` (default: ``None``); if ``True``, the
function yields only proven primes. If ``False``, the function uses a
pseudo-primality test, which is much faster for really big numbers but
does not provide a proof of primality. If ``None``, uses the global
Expand Down Expand Up @@ -1691,21 +1691,19 @@ def plot(self, xmin=1, xmax=50, k=1, pointsize=30, rgbcolor=(0,0,1), join=True,
INPUT:
- ``xmin`` -- default: 1
- ``xmin`` -- default: 1
- ``xmax`` -- default: 50
- ``xmax`` -- default: 50
- ``k`` -- default: 1
- ``k`` -- default: 1
- ``pointsize`` -- default: 30
- ``pointsize`` -- default: 30
- ``rgbcolor`` -- default: (0,0,1)
- ``rgbcolor`` -- default: (0,0,1)
- ``join`` -- default: ``True``; whether to join the
points.
- ``join`` -- default: ``True``; whether to join the points
- ``**kwds`` -- passed on
- ``**kwds`` -- passed on
EXAMPLES::
Expand Down Expand Up @@ -2323,9 +2321,9 @@ def rational_reconstruction(a, m, algorithm='fast'):
- ``m`` -- a modulus
- ``algorithm`` -- string (default: ``'fast'``s)
- ``algorithm`` -- string (default: ``'fast'``)
- ``'fast'`` -- a fast implementation using direct GMP library calls
- ``'fast'`` -- a fast implementation using direct GMP library calls
in Cython
OUTPUT:
Expand Down Expand Up @@ -6054,8 +6052,8 @@ def squarefree_divisors(x):
INPUT:
- x -- an element of any ring for which the prime_divisors
function works.
- ``x`` -- an element of any ring for which the prime_divisors
function works
EXAMPLES:
Expand Down
Loading

1 comment on commit 6922a4c

@kwankyu
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise lgtm.

Please sign in to comment.