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.
Work in `knots`, `lfunctions`.
  • Loading branch information
gmou3 committed Jun 16, 2024
1 parent e2b4155 commit fa498ef
Show file tree
Hide file tree
Showing 111 changed files with 762 additions and 867 deletions.
2 changes: 1 addition & 1 deletion src/sage/algebras/askey_wilson.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ def _on_basis(self, c):
INPUT:
- ``c`` -- a tuple of length 6
- ``c`` -- tuple of length 6
OUTPUT: element of the codomain
Expand Down
8 changes: 4 additions & 4 deletions src/sage/algebras/clifford_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ def boundary(self, s_coeff):
INPUT:
- ``s_coeff`` -- a dictionary whose keys are in `I \times I`, where
- ``s_coeff`` -- dictionary whose keys are in `I \times I`, where
`I` is the index set of the underlying vector space `V`, and whose
values can be coerced into 1-forms (degree 1 elements) in ``E``
(usually, these values will just be elements of `V`)
Expand All @@ -1725,7 +1725,7 @@ def coboundary(self, s_coeff):
INPUT:
- ``s_coeff`` -- a dictionary whose keys are in `I \times I`, where
- ``s_coeff`` -- dictionary whose keys are in `I \times I`, where
`I` is the index set of the underlying vector space `V`, and whose
values can be coerced into 1-forms (degree 1 elements) in ``E``
(usually, these values will just be elements of `V`)
Expand Down Expand Up @@ -2201,7 +2201,7 @@ class ExteriorAlgebraBoundary(ExteriorAlgebraDifferential):
INPUT:
- ``E`` -- an exterior algebra of a vector space `L`
- ``s_coeff`` -- a dictionary whose keys are in `I \times I`, where
- ``s_coeff`` -- dictionary whose keys are in `I \times I`, where
`I` is the index set of the basis of the vector space `L`, and whose
values can be coerced into 1-forms (degree 1 elements) in ``E``;
this dictionary will be used to define the Lie algebra structure
Expand Down Expand Up @@ -2446,7 +2446,7 @@ class ExteriorAlgebraCoboundary(ExteriorAlgebraDifferential):
INPUT:
- ``E`` -- an exterior algebra of a vector space `L`
- ``s_coeff`` -- a dictionary whose keys are in `I \times I`, where
- ``s_coeff`` -- dictionary whose keys are in `I \times I`, where
`I` is the index set of the basis of the vector space `L`, and whose
values can be coerced into 1-forms (degree 1 elements) in ``E``;
this dictionary will be used to define the Lie algebra structure
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/clifford_algebra_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ cdef class ExteriorAlgebraElement(CliffordAlgebraElement):
INPUT:
- ``I`` -- a list of exterior algebra elements or an ideal
- ``I`` -- list of exterior algebra elements or an ideal
- ``left`` -- boolean; if reduce as a left ideal (``True``)
or right ideal (``False``), ignored if ``I`` is an ideal
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/cluster_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ class ClusterAlgebra(Parent, UniqueRepresentation):
to be a valid variable name; supersedes ``cluster_variable_prefix``
- ``coefficient_prefix`` -- string (default: ``'y'``); it needs to be
a valid variable name.
a valid variable name
- ``coefficient_names`` -- list of strings; each element needs
to be a valid variable name; supersedes ``cluster_variable_prefix``
Expand Down Expand Up @@ -1995,7 +1995,7 @@ def find_g_vector(self, g_vector, depth=infinity):
INPUT:
- ``g_vector`` -- a tuple: the g-vector to find
- ``g_vector`` -- tuple; the g-vector to find
- ``depth`` -- a positive integer or infinity (default: ``infinity``);
the maximum distance from ``self.current_seed`` to reach
Expand Down
14 changes: 7 additions & 7 deletions src/sage/algebras/commutative_dga.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ def differential(self, diff):
INPUT:
- ``diff`` -- a dictionary defining a differential
- ``diff`` -- dictionary defining a differential
The keys of the dictionary are generators of the algebra, and
the associated values are their targets under the
Expand Down Expand Up @@ -1375,7 +1375,7 @@ def cdg_algebra(self, differential):
INPUT:
- ``differential`` -- a dictionary defining a differential or
- ``differential`` -- dictionary defining a differential or
a map defining a valid differential
The keys of the dictionary are generators of the algebra, and
Expand Down Expand Up @@ -1707,7 +1707,7 @@ class GCAlgebra_multigraded(GCAlgebra):
- ``base`` -- the base field
- ``degrees`` -- a tuple or list specifying the degrees of the
- ``degrees`` -- tuple or list specifying the degrees of the
generators
- ``names`` -- (optional) names of the generators: a list of
Expand Down Expand Up @@ -1864,7 +1864,7 @@ def basis(self, n, total=False):
- ``n`` -- degree or integer
- ``total`` -- boolean (default: ``False``); if ``True``, return the
basis in total degree `n`.
basis in total degree `n`
If `n` is an integer rather than a multi-index, then the
total degree is used in that case as well.
Expand Down Expand Up @@ -1902,7 +1902,7 @@ def differential(self, diff):
INPUT:
- ``diff`` -- a dictionary defining a differential
- ``diff`` -- dictionary defining a differential
The keys of the dictionary are generators of the algebra, and
the associated values are their targets under the
Expand All @@ -1928,7 +1928,7 @@ def cdg_algebra(self, differential):
INPUT:
- ``differential`` -- a dictionary defining a differential or
- ``differential`` -- dictionary defining a differential or
a map defining a valid differential
The keys of the dictionary are generators of the algebra, and
Expand Down Expand Up @@ -2128,7 +2128,7 @@ def cdg_algebra(self, differential):
INPUT:
- ``differential`` -- a dictionary defining a differential or
- ``differential`` -- dictionary defining a differential or
a map defining a valid differential
The keys of the dictionary are generators of the algebra, and
Expand Down
10 changes: 5 additions & 5 deletions src/sage/algebras/finite_gca.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ class FiniteGCAlgebra(CombinatorialFreeModule):
- ``degrees`` -- (optional) a tuple or list specifying the degrees
of the generators; if omitted, each generator is given degree
1, and if both ``names`` and ``degrees`` are omitted, an error is
raised.
raised
- ``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.
If omitted, the empty string is used.
- ``mul_symbol`` -- (optional) symbol used for multiplication; if omitted,
the string "*" is used
- ``mul_latex_symbol`` -- (optional) latex symbol used for multiplication;
if omitted, the empty string is used
EXAMPLES::
Expand Down
6 changes: 3 additions & 3 deletions src/sage/algebras/fusion_rings/f_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ def save_fvars(self, filename):
INPUT:
- ``filename`` -- a string specifying the name of the pickle file
- ``filename`` -- string specifying the name of the pickle file
to be used
The current directory is used unless an absolute path to a file in
Expand Down Expand Up @@ -1442,7 +1442,7 @@ def get_defining_equations(self, option, output=True):
INPUT:
- ``option`` -- a string determining equations to be set up:
- ``option`` -- string determining equations to be set up:
* ``'hexagons'`` -- get equations imposed on the F-matrix by
the hexagon relations in the definition of a braided category
Expand Down Expand Up @@ -2032,7 +2032,7 @@ def find_orthogonal_solution(self, checkpoint=False, save_results='', warm_start
results much more quickly.
- ``verbose`` -- boolean (default: ``True``); whether the
solver should print out intermediate progress reports.
solver should print out intermediate progress reports
OUTPUT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ cpdef executor(tuple params):
INPUT:
- ``params`` -- a tuple ``((fn_name, fmats_id), fn_args)`` where
- ``params`` -- tuple ``((fn_name, fmats_id), fn_args)`` where
``fn_name`` is the name of the function to be executed, ``fmats_id``
is the ``id`` of the :class:`FMatrix` object, and ``fn_args`` is a
tuple containing all arguments to be passed to the function ``fn_name``.
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 @@ -1210,9 +1210,9 @@ def _emap(self, mapper, input_args, worker_pool=None):
INPUT:
- ``mapper`` -- a string specifying the name of a function defined
- ``mapper`` -- string specifying the name of a function defined
in the ``fast_parallel_fusion_ring_braid_repn`` module
- ``input_args`` -- a tuple of arguments to be passed to mapper
- ``input_args`` -- tuple of arguments to be passed to mapper
This method applies the mapper in parallel if a ``worker_pool``
is provided.
Expand Down
8 changes: 4 additions & 4 deletions src/sage/algebras/fusion_rings/poly_tup_engine.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ cdef dict subs_squares(dict eq_dict, KSHandler known_sq):
INPUT:
- ``eq_dict`` -- a dictionary of ``(ETuple, coeff)`` pairs representing
- ``eq_dict`` -- dictionary of ``(ETuple, coeff)`` pairs representing
a polynomial
- ``known_sq`` -- a dictionary of ``(int i, NumberFieldElement a)`` pairs
- ``known_sq`` -- dictionary of ``(int i, NumberFieldElement a)`` pairs
such that `x_i^2 - a = 0`
OUTPUT:
Expand Down Expand Up @@ -446,8 +446,8 @@ cpdef dict compute_known_powers(max_degs, dict val_dict, one):
- ``max_deg`` -- an ``ETuple`` indicating the maximal degree of
each variable
- ``val_dict`` -- a dictionary of ``(var_idx, poly_tup)`` key-value pairs
- ``poly_tup`` -- a tuple of ``(ETuple, coeff)`` pairs reperesenting a
- ``val_dict`` -- dictionary of ``(var_idx, poly_tup)`` key-value pairs
- ``poly_tup`` -- tuple of ``(ETuple, coeff)`` pairs reperesenting a
multivariate polynomial
EXAMPLES::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/fusion_rings/shm_managers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cdef class KSHandler:
- ``field`` -- F-matrix's base cyclotomic field
- ``use_mp`` -- boolean indicating whether to construct a shared
memory block to back ``self``
- ``init_data`` -- a dictionary or :class:`KSHandler` object containing
- ``init_data`` -- 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
for attaching)
Expand Down Expand Up @@ -396,7 +396,7 @@ cdef class FvarsHandler:
- ``field`` -- base field for polynomial ring
- ``idx_to_sextuple`` -- map relating a single integer index to a sextuple
of ``FusionRing`` elements
- ``init_data`` -- a dictionary or :class:`FvarsHandler` object containing
- ``init_data`` -- dictionary or :class:`FvarsHandler` object containing
known squares for initialization, e.g., from a solver checkpoint
- ``use_mp`` -- integer indicating the number of child processes
used for multiprocessing; if running serially, use 0
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/hecke_algebras/ariki_koike_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ def _product_Tw_L(self, w, L):
INPUT:
- ``w`` -- a permutation
- ``L`` -- a tuple `(a_1, \ldots, a_n)`
- ``L`` -- tuple `(a_1, \ldots, a_n)`
EXAMPLES::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
"""
INPUT:
- A free associative unital algebra in letterplace implementation, `A`.
- A homogeneous polynomial that can be coerced into the currently
used polynomial ring of `A`.
- ``check`` (optional bool, default ``True``): Do not attempt the
above coercion (for internal use only).
- ``A`` - a free associative unital algebra in letterplace implementation
- ``x`` -- a homogeneous polynomial that can be coerced into the currently
used polynomial ring of `A`
- ``check`` -- boolean (default: ``True``); do not attempt the
above coercion (for internal use only)
TESTS::
Expand Down
12 changes: 6 additions & 6 deletions src/sage/algebras/letterplace/free_algebra_letterplace.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -784,12 +784,12 @@ cdef class FreeAlgebra_letterplace(Parent):
INPUT:
- A dictionary. Keys: tuples of exponents. Values:
The coefficients of the corresponding monomial
in the to-be-created element.
- ``check`` (optional bool, default ``True``):
This is forwarded to the initialisation of
:class:`~sage.algebras.letterplace.free_algebra_element_letterplace.FreeAlgebraElement_letterplace`.
- ``D`` -- dictionary; keys: tuples of exponents, values:
the coefficients of the corresponding monomial
in the to-be-created element
- ``check`` -- boolean (default: ``True``);
this is forwarded to the initialisation of
:class:`~sage.algebras.letterplace.free_algebra_element_letterplace.FreeAlgebraElement_letterplace`
TESTS:
Expand Down
10 changes: 5 additions & 5 deletions src/sage/algebras/letterplace/letterplace_ideal.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ class LetterplaceIdeal(Ideal_nc):
"""
INPUT:
- ``ring``: A free algebra in letterplace implementation.
- ``gens``: List, tuple or sequence of generators.
- ``coerce`` (optional bool, default ``True``):
Shall ``gens`` be coerced first?
- ``side``: optional string, one of ``'twosided'`` (default),
- ``ring`` -- a free algebra in letterplace implementation
- ``gens`` -- list, tuple or sequence of generators
- ``coerce`` -- boolean (default: ``True``); whether ``gens`` shall be
coerced first
- ``side`` -- optional string, one of ``'twosided'`` (default),
``'left'`` or ``'right'``. Determines whether the ideal
is a left, right or twosided ideal. Groebner bases or
only supported in the twosided case.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/lie_algebras/lie_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def _from_dict(self, d, coerce=False, remove_zeros=True):
INPUT:
- ``d`` -- a dictionary ``{index: coeff}`` where each ``index`` is the
- ``d`` -- dictionary ``{index: coeff}`` where each ``index`` is the
index of a basis element and each ``coeff`` belongs to the
coefficient ring ``self.base_ring()``
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/lie_algebras/nilpotent_lie_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class NilpotentLieAlgebra_dense(LieAlgebraWithStructureCoefficients):
INPUT:
- ``R`` -- the base ring
- ``s_coeff`` -- a dictionary of structural coefficients
- ``s_coeff`` -- dictionary of structural coefficients
- ``names`` -- (default: ``None``) list of strings to use as names of basis
elements; if ``None``, the names will be inferred from the structural
coefficients
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/lie_algebras/structure_coefficients.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class LieAlgebraWithStructureCoefficients(FinitelyGeneratedLieAlgebra, IndexedGe
- ``R`` -- a ring, to be used as the base ring
- ``s_coeff`` -- a dictionary, indexed by pairs of basis indices
- ``s_coeff`` -- dictionary, indexed by pairs of basis indices
(see below), and whose values are dictionaries which are
indexed by (single) basis indices and whose values are elements
of `R`
Expand Down Expand Up @@ -366,7 +366,7 @@ def _from_dict(self, d, coerce=False, remove_zeros=False):
INPUT:
- ``d`` -- a dictionary ``{index: coeff}`` where each ``index`` is the
- ``d`` -- dictionary ``{index: coeff}`` where each ``index`` is the
index of a basis element and each ``coeff`` belongs to the
coefficient ring ``self.base_ring()``
- ``coerce`` -- ignored
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class AbelianLieConformalAlgebra(GradedLieConformalAlgebra):
``None``); the parity of the generators. If not ``None`` the
resulting Lie Conformal algebra is a Super Lie conformal
algebra
- ``names`` -- a tuple of ``str`` or ``None`` (default: ``None``
); the list of names of the generators of this algebra.
- ``names`` -- tuple of strings or ``None`` (default: ``None``);
the list of names of the generators of this algebra.
- ``index_set`` -- an enumerated set or ``None`` (default:
``None``); A set indexing the generators of this Lie
conformal algebra.
``None``); a set indexing the generators of this Lie
conformal algebra
OUTPUT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FermionicGhostsLieConformalAlgebra(GradedLieConformalAlgebra):
- ``ngens`` -- an even positive Integer (default: ``2``); the
number of non-central generators of this Lie conformal
algebra
- ``names`` -- a tuple of ``str``; alternative names for the
- ``names`` -- tuple of strings; alternative names for the
generators
- ``index_set`` -- an enumerated set; alternative indexing
set for the generators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class FreeBosonsLieConformalAlgebra(GradedLieConformalAlgebra):
- ``gram_matrix``: a symmetric square matrix with coefficients
in ``R`` (default: ``identity_matrix(ngens)``); the Gram
matrix of the inner product
- ``names`` -- a tuple of ``str``; alternative names for the
- ``names`` -- tuple of strings; alternative names for the
generators
- ``index_set`` -- an enumerated set; alternative indexing set
for the generators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ class GradedLieConformalAlgebra(LieConformalAlgebraWithStructureCoefficients):
ring of this Lie conformal algebra. Behaviour is undefined if
it is not a field of characteristic zero
- ``s_coeff`` -- a dictionary (default: ``None``); as in the
- ``s_coeff`` -- dictionary (default: ``None``); as in the
input of :class:`LieConformalAlgebra`
- ``names`` -- tuple of ``str`` (default: ``None``); as in the
- ``names`` -- tuple of strings (default: ``None``); as in the
input of :class:`LieConformalAlgebra`
- ``central_elements`` -- tuple of ``str`` (default: ``None``);
- ``central_elements`` -- tuple of strings (default: ``None``);
as in the input of :class:`LieConformalAlgebra`
- ``index_set`` -- enumerated set (default: ``None``); as in the
Expand Down
Loading

0 comments on commit fa498ef

Please sign in to comment.