Skip to content

Commit

Permalink
Docstring edits
Browse files Browse the repository at this point in the history
One-line outputs, "an integer" to "integer", "non-zero" to "nonzero", etc.
  • Loading branch information
gmou3 committed Jun 7, 2024
1 parent 14a3682 commit 9eab12f
Show file tree
Hide file tree
Showing 102 changed files with 397 additions and 504 deletions.
4 changes: 2 additions & 2 deletions src/sage/algebras/askey_wilson.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,10 +800,10 @@ def __init__(self, domain, on_generators, position=0, codomain=None,
INPUT:
- ``domain`` -- an Askey-Wilson algebra
- ``on_generators`` -- a list of length 6 corresponding to
- ``on_generators`` -- list of length 6 corresponding to
the images of the generators
- ``codomain`` -- (optional) the codomain
- ``position`` -- (default: 0) integer
- ``position`` -- integer (default: 0)
- ``category`` -- (optional) category
OUTPUT: module morphism
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/clifford_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ class ExteriorAlgebra(CliffordAlgebra):
- ``R`` -- the base ring, *or* the free module whose exterior algebra
is to be computed
- ``names`` -- a list of strings to name the generators of the
- ``names`` -- list of strings to name the generators of the
exterior algebra; this list can either have one entry only (in which
case the generators will be called ``e + '0'``, ``e + '1'``, ...,
``e + 'n-1'``, with ``e`` being said entry), or have ``n`` entries
Expand Down
16 changes: 8 additions & 8 deletions src/sage/algebras/cluster_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ def c_vector(self, j) -> tuple:
INPUT:
- ``j`` -- an integer in ``range(self.parent().rank())``;
- ``j`` -- integer in ``range(self.parent().rank())``;
the index of the c-vector to return
EXAMPLES::
Expand Down Expand Up @@ -953,7 +953,7 @@ def g_vector(self, j) -> tuple:
INPUT:
- ``j`` -- an integer in ``range(self.parent().rank())``;
- ``j`` -- integer in ``range(self.parent().rank())``;
the index of the g-vector to return
EXAMPLES::
Expand Down Expand Up @@ -984,7 +984,7 @@ def F_polynomial(self, j):
INPUT:
- ``j`` -- an integer in ``range(self.parent().rank())``;
- ``j`` -- integer in ``range(self.parent().rank())``;
the index of the F-polynomial to return
EXAMPLES::
Expand Down Expand Up @@ -1015,7 +1015,7 @@ def cluster_variable(self, j):
INPUT:
- ``j`` -- an integer in ``range(self.parent().rank())``;
- ``j`` -- integer in ``range(self.parent().rank())``;
the index of the cluster variable to return
EXAMPLES::
Expand Down Expand Up @@ -1226,13 +1226,13 @@ class ClusterAlgebra(Parent, UniqueRepresentation):
- ``cluster_variable_prefix`` -- string (default ``'x'``); it needs to be
a valid variable name
- ``cluster_variable_names`` -- a list of strings; each element needs
- ``cluster_variable_names`` -- list of strings; each element needs
to be a valid variable name; supersedes ``cluster_variable_prefix``
- ``coefficient_prefix`` -- string (default ``'y'``); it needs to be
a valid variable name.
- ``coefficient_names`` -- a list of strings; each element needs
- ``coefficient_names`` -- list of strings; each element needs
to be a valid variable name; supersedes ``cluster_variable_prefix``
- ``principal_coefficients`` -- boolean (default ``False``); supersedes any
Expand Down Expand Up @@ -2112,7 +2112,7 @@ def coefficient(self, j):
INPUT:
- ``j`` -- an integer in ``range(self.parent().rank())``;
- ``j`` -- integer in ``range(self.parent().rank())``;
the index of the coefficient to return
EXAMPLES::
Expand Down Expand Up @@ -2168,7 +2168,7 @@ def initial_cluster_variable(self, j):
INPUT:
- ``j`` -- an integer in ``range(self.parent().rank())``;
- ``j`` -- integer in ``range(self.parent().rank())``;
the index of the cluster variable to return
EXAMPLES::
Expand Down
6 changes: 3 additions & 3 deletions src/sage/algebras/commutative_dga.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def sorting_keys(element):
INPUT:
- ``element`` -- A CohomologyClass
- ``element`` -- a CohomologyClass
OUTPUT: its coordinates in the corresponding ``cohomology_raw`` quotient vector space
Expand Down Expand Up @@ -3498,7 +3498,7 @@ def GradedCommutativeAlgebra(ring, names=None, degrees=None, max_degree=None,
- ``ring`` -- a graded commutative algebra
- ``relations`` -- a list or tuple of elements of ``ring``
- ``relations`` -- list or tuple of elements of ``ring``
EXAMPLES:
Expand Down Expand Up @@ -4222,7 +4222,7 @@ def total_degree(deg):
INPUT:
- ``deg`` -- an element of a free abelian group.
- ``deg`` -- an element of a free abelian group
In fact, ``deg`` could be an integer, a Python int, a list, a
tuple, a vector, etc. This function returns the sum of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FiniteDimensionalAlgebra(UniqueRepresentation, Algebra):
- ``k`` -- a field
- ``table`` -- a list of matrices
- ``table`` -- list of matrices
- ``names`` -- string (default: ``'e'``); names for the basis
elements
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/finite_gca.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class FiniteGCAlgebra(CombinatorialFreeModule):
of the generators; if omitted, each generator is given degree
1, and if both ``names`` and ``degrees`` are omitted, an error is
raised.
- ``max_degree`` -- the maximal degree of the graded algebra.
- ``max_degree`` -- the maximal degree of the graded algebra
- ``mul_symbol`` -- (optional) symbol used for multiplication. If omitted,
the string "*" is used.
- ``mul_latex_symbol`` -- (optional) latex symbol used for multiplication.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/free_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ class FreeAlgebra_generic(CombinatorialFreeModule):
INPUT:
- ``R`` -- a ring
- ``n`` -- an integer
- ``n`` -- integer
- ``names`` -- the generator names
- ``degrees`` -- (optional) a tuple or list specifying the
degrees of all the generators, if omitted, the algebra is not
Expand Down
17 changes: 7 additions & 10 deletions src/sage/algebras/fusion_rings/f_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -1227,14 +1227,11 @@ def start_worker_pool(self, processes=None):
INPUT:
- ``processes`` -- an integer indicating the number of workers
in the pool; if left unspecified, the number of workers is
- ``processes`` -- integer indicating the number of workers
in the pool; if left unspecified, the number of workers
equals the number of processors available
OUTPUT:
This method returns a boolean indicating whether a worker pool
was successfully initialized.
OUTPUT: boolean; whether a worker pool was successfully initialized
EXAMPLES::
Expand Down Expand Up @@ -1399,7 +1396,7 @@ def get_orthogonality_constraints(self, output=True):
INPUT:
- ``output`` -- a boolean
- ``output`` -- boolean
OUTPUT:
Expand Down Expand Up @@ -1621,7 +1618,7 @@ def equations_graph(self, eqns=None):
INPUT:
- ``eqns`` -- a list of polynomials
- ``eqns`` -- list of polynomials
Each polynomial is either an object in the ring returned by
:meth:`get_poly_ring` or it is a tuple of pairs representing
Expand Down Expand Up @@ -1783,8 +1780,8 @@ def _get_component_variety(self, var, eqns):
INPUT:
- ``var`` -- a list of variable indices
- ``eqns`` -- a list of polynomial equations in the internal
- ``var`` -- list of variable indices
- ``eqns`` -- list of polynomial equations in the internal
tuple of pairs representation
EXAMPLES::
Expand Down
6 changes: 3 additions & 3 deletions src/sage/algebras/fusion_rings/shm_managers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ cdef class KSHandler:
- ``n_slots`` -- the total number of F-symbols
- ``field`` -- F-matrix's base cyclotomic field
- ``use_mp`` -- a boolean indicating whether to construct a shared
memory block to back ``self``.
- ``use_mp`` -- boolean indicating whether to construct a shared
memory block to back ``self``
- ``init_data`` -- a dictionary or :class:`KSHandler` object containing
known squares for initialization, e.g., from a solver checkpoint
- ``name`` -- the name of a shared memory object (used by child processes
Expand Down Expand Up @@ -398,7 +398,7 @@ cdef class FvarsHandler:
of ``FusionRing`` elements
- ``init_data`` -- a dictionary or :class:`FvarsHandler` object containing
known squares for initialization, e.g., from a solver checkpoint
- ``use_mp`` -- an integer indicating the number of child processes
- ``use_mp`` -- integer indicating the number of child processes
used for multiprocessing; if running serially, use 0.
- ``pids_name`` -- the name of a ``ShareableList`` contaning the
process ``pid``'s for every process in the pool (including the
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/hecke_algebras/cubic_hecke_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def matrix(self, subdivide=False, representation_type=None, original=False):
INPUT:
- ``subdivide`` -- boolean (default: ``False``): this boolean is passed
- ``subdivide`` -- boolean (default: ``False``); this boolean is passed
to the block_matrix function
- ``representation_type`` -- instance of enum :class:`RepresentationType`;
this can be obtained by the attribute :attr:`CubicHeckeAlgebra.repr_type`
Expand All @@ -327,7 +327,7 @@ def matrix(self, subdivide=False, representation_type=None, original=False):
- default: ``SplitIrredChevie`` taken if GAP3 and CHEVIE are installed
on the system, otherwise the default will be ``SplitIrredMarin``
- ``original`` -- boolean (default: ``False``): if set to true the base
- ``original`` -- boolean (default: ``False``); if set to ``True`` the base
ring of the matrix will be the generic base_ring resp. generic extension
ring (for the split versions) of the parent of ``self``
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/letterplace/free_algebra_letterplace.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,8 @@ cdef class FreeAlgebra_letterplace(Parent):
INPUT:
- ``g`` -- a list of elements of this free algebra.
- ``d`` -- an integer.
- ``g`` -- list of elements of this free algebra
- ``d`` -- integer
OUTPUT:
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/lie_algebras/lie_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,10 +708,10 @@ def _from_dict(self, d, coerce=False, remove_zeros=True):
index of a basis element and each ``coeff`` belongs to the
coefficient ring ``self.base_ring()``
- ``coerce`` -- a boolean (default: ``False``), whether to coerce the
- ``coerce`` -- boolean (default: ``False``); whether to coerce the
``coeff`` to the coefficient ring
- ``remove_zeros`` -- a boolean (default: ``True``), if some
- ``remove_zeros`` -- boolean (default: ``True``); if some
``coeff`` may be zero and should therefore be removed
EXAMPLES::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/lie_algebras/nilpotent_lie_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ class FreeNilpotentLieAlgebra(NilpotentLieAlgebra_dense):
INPUT:
- ``R`` -- the base ring
- ``r`` -- an integer; the number of generators
- ``s`` -- an integer; the nilpotency step of the algebra
- ``r`` -- integer; the number of generators
- ``s`` -- integer; the nilpotency step of the algebra
- ``names`` -- (optional) a string or a list of strings used to name the
basis elements; if ``names`` is a string, then names for the basis
will be autogenerated as determined by the ``naming`` parameter
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/lie_algebras/subalgebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
INPUT:
- ``ambient`` -- the Lie algebra containing the subalgebra
- ``gens`` -- a list of generators of the subalgebra
- ``gens`` -- list of generators of the subalgebra
- ``ideal`` -- boolean (default: ``False``); if ``True``, then ``gens``
is interpreted as the generating set of an ideal instead of a subalgebra
- ``order`` -- (optional) the key used to sort the indices of ``ambient``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ class AbelianLieConformalAlgebra(GradedLieConformalAlgebra):
- ``R`` -- a commutative ring; the base ring of this Lie
conformal algebra
- ``ngens`` -- a positive integer (default: ``1``); the number
- ``ngens`` -- a positive integer (default: `1`); the number
of generators of this Lie conformal algebra
- ``weights`` -- a list of positive rational numbers (default:
``1`` for each
generator); the weights of the generators. The resulting
- ``weights`` -- list of positive rational numbers (default:
`1` for each generator); the weights of the generators. The resulting
Lie conformal algebra is `H`-graded.
- ``parity`` -- ``None`` or a list of ``0`` or ``1`` (default:
``None``); The parity of the generators. If not ``None`` the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class AffineLieConformalAlgebra(GradedLieConformalAlgebra):
root_system.cartan_type>`; the Cartan Type for
the corresponding finite dimensional Lie algebra. It must
correspond to a simple finite dimensional Lie algebra.
- ``names`` -- a list of ``str`` or ``None`` (default: ``None``)
; alternative names for the generators. If ``None`` the
- ``names`` -- list of ``str`` or ``None`` (default: ``None``);
alternative names for the generators. If ``None`` the
generators are labeled by the corresponding root and coroot
vectors.
- ``prefix`` -- a ``str``; parameter passed to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class BosonicGhostsLieConformalAlgebra(GradedLieConformalAlgebra):
INPUT:
- ``R`` -- a commutative ring.
- ``R`` -- a commutative ring
- ``ngens`` -- an even positive Integer (default: ``2``); the
number of non-central generators of this Lie conformal
algebra.
- ``names`` -- a list of ``str``; alternative names for the
- ``names`` -- list of ``str``; alternative names for the
generators
- ``index_set`` -- an enumerated set; An indexing set for the
generators.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class FreeBosonsLieConformalAlgebra(GradedLieConformalAlgebra):
INPUT:
- ``R`` -- a commutative ring.
- ``ngens`` -- a positive Integer (default ``1``); the number of
- ``R`` -- a commutative ring
- ``ngens`` -- a positive Integer (default `1`); the number of
non-central generators of this Lie conformal algebra.
- ``gram_matrix``: a symmetric square matrix with coefficients
in ``R`` (default: ``identity_matrix(ngens)``); the Gram
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,13 @@ class LieConformalAlgebra(UniqueRepresentation, Parent):
In addition we accept the following keywords:
- ``graded`` -- a boolean (default: ``False``);
- ``graded`` -- boolean (default: ``False``);
if ``True``, the returned algebra is H-Graded.
If ``weights`` is not specified, all non-central generators
are assigned degree `1`. This keyword is ignored if
``weights`` is specified
- ``super`` -- a boolean (default: ``False``);
- ``super`` -- boolean (default: ``False``);
if ``True``, the returned algebra is a super
Lie conformal algebra even if all generators are even.
If ``parity`` is not specified, all generators are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class LieConformalAlgebraWithStructureCoefficients(
conformal algebra. Behaviour is undefined if it is not a field
of characteristic zero.
- ``s_coeff`` -- Dictionary (Default: ``None``);
- ``s_coeff`` -- dictionary (Default: ``None``);
a dictionary containing the `\lambda` brackets of the
generators of this Lie conformal algebra. The family encodes a
dictionary whose keys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class WeylLieConformalAlgebra(LieConformalAlgebraWithStructureCoefficients):
of non-central generators of this Lie conformal algebra.
- ``gram_matrix``: a matrix (default: ``None``); A non-singular
skew-symmetric square matrix with coefficients in `R`.
- ``names`` -- a list or tuple of ``str``; alternative names
- ``names`` -- list or tuple of ``str``; alternative names
for the generators
- ``index_set`` -- an enumerated set; alternative indexing set
for the generators
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/quantum_groups/fock_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ def e(self, *data):
INPUT:
- ``*data`` -- a list of indices or pairs `(i, p)`
- ``*data`` -- list of indices or pairs `(i, p)`
EXAMPLES::
Expand Down Expand Up @@ -855,7 +855,7 @@ def f(self, *data):
INPUT:
- ``*data`` -- a list of indices or pairs `(i, p)`
- ``*data`` -- list of indices or pairs `(i, p)`
EXAMPLES::
Expand Down
Loading

0 comments on commit 9eab12f

Please sign in to comment.