Skip to content

Commit

Permalink
Docstring edits
Browse files Browse the repository at this point in the history
Up to `graphs`.
  • Loading branch information
gmou3 committed Jun 17, 2024
1 parent 16c9892 commit 055b9cf
Show file tree
Hide file tree
Showing 110 changed files with 801 additions and 806 deletions.
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 @@ -149,8 +149,8 @@ cdef MPolynomialRing_libsingular make_letterplace_ring(base_ring, blocks):
INPUT:
- ``base_ring``: A multivariate polynomial ring.
- ``blocks``: The number of blocks to be formed.
- ``base_ring`` -- a multivariate polynomial ring
- ``blocks`` -- the number of blocks to be formeds
OUTPUT:
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/letterplace/letterplace_ideal.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ class LetterplaceIdeal(Ideal_nc):
INPUT:
- ``G``: A list or tuple of elements, an ideal,
the ambient algebra, or a single element.
- ``G`` -- a list or tuple of elements, an ideal,
the ambient algebra, or a single element
OUTPUT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class FreeBosonsLieConformalAlgebra(GradedLieConformalAlgebra):
- ``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
- ``gram_matrix`` -- a symmetric square matrix with coefficients
in ``R`` (default: ``identity_matrix(ngens)``); the Gram
matrix of the inner product
- ``names`` -- tuple of strings; alternative names for the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ class FreeFermionsLieConformalAlgebra(GradedLieConformalAlgebra):
INPUT:
- ``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
- ``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
matrix of the inner product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class WeylLieConformalAlgebra(LieConformalAlgebraWithStructureCoefficients):
- ``R`` -- a commutative ring; the base ring of this Lie
conformal algebra
- ``ngens``: an even positive Integer (default: `2`); the number
- ``ngens`` -- an even positive Integer (default: `2`); the number
of non-central generators of this Lie conformal algebra
- ``gram_matrix``: a matrix (default: ``None``); a non-singular
- ``gram_matrix`` -- a matrix (default: ``None``); a non-singular
skew-symmetric square matrix with coefficients in `R`
- ``names`` -- list or tuple of strings; alternative names
for the generators
Expand Down
20 changes: 10 additions & 10 deletions src/sage/algebras/steenrod/steenrod_algebra_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,20 +284,20 @@ def steenrod_algebra_basis(n, basis='milnor', p=2, **kwds):
documentation for :mod:`sage.algebras.steenrod.steenrod_algebra`
for details on each basis:
- ``'milnor'``: Milnor basis.
- ``'serre-cartan'`` or ``'adem'`` or ``'admissible'``: Serre-Cartan basis.
- ``'pst'``, ``'pst_rlex'``, ``'pst_llex'``, ``'pst_deg'``, ``'pst_revz'``:
various `P^s_t`-bases.
- ``'milnor'`` -- Milnor basis
- ``'serre-cartan'`` or ``'adem'`` or ``'admissible'`` -- Serre-Cartan basis
- ``'pst'``, ``'pst_rlex'``, ``'pst_llex'``, ``'pst_deg'``, ``'pst_revz'`` --
various `P^s_t`-bases
- ``'comm'``, ``'comm_rlex'``, ``'comm_llex'``, ``'comm_deg'``, ``'comm_revz'``, or
any of these with ``'_long'`` appended: various commutator bases.
any of these with ``'_long'`` appended -- various commutator bases
The rest of these bases are only defined when `p=2`.
- ``'wood_y'``: Wood's Y basis.
- ``'wood_z'``: Wood's Z basis.
- ``'wall'`` or ``'wall_long'``: Wall's basis.
- ``'arnon_a'`` or ``'arnon_a_long'``: Arnon's A basis.
- ``'arnon_c'``: Arnon's C basis.
- ``'wood_y'`` -- Wood's Y basis
- ``'wood_z'`` -- Wood's Z basis
- ``'wall'`` or ``'wall_long'`` -- Wall's basis
- ``'arnon_a'`` or ``'arnon_a_long'`` -- Arnon's A basis
- ``'arnon_c'`` -- Arnon's C basis
EXAMPLES::
Expand Down
26 changes: 13 additions & 13 deletions src/sage/arith/long.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ cdef inline bint integer_check_long(x, long* value, int* err) except -1:
Possible errors when returning ``True``:
- ``0``: ``x`` was successfully converted to a C long and its value
is stored in ``*value``.
- ``0`` -- ``x`` was successfully converted to a C long and its value
is stored in ``*value``
- ``ERR_OVERFLOW``: ``x`` is an integer type but too large to store
in a C long.
- ``ERR_OVERFLOW`` -- ``x`` is an integer type but too large to store
in a C long
Possible errors when returning ``False``:
- ``ERR_TYPE``: ``x`` is not an integer type of any kind.
- ``ERR_TYPE`` -- ``x`` is not an integer type of any kind
- ``ERR_INDEX``: ``x`` implements ``__index__`` but a :class:`TypeError`
was raised calling ``__index__()``.
- ``ERR_INDEX`` -- ``x`` implements ``__index__`` but a :class:`TypeError`
was raised calling ``__index__()``
- Other exceptions in ``__index__`` are simply propagated. This is
the only way this function can raise an exception.
Expand Down Expand Up @@ -225,7 +225,7 @@ cdef inline long dig(const digit* D, int n) noexcept:

cdef inline bint integer_check_long_py(x, long* value, int* err) noexcept:
"""
Return whether ``x`` is a python object of type ``int``.
Return whether ``x`` is a Python object of type ``int``.
If possible, compute the value of this integer as C long and store
it in ``*value``.
Expand All @@ -235,15 +235,15 @@ cdef inline bint integer_check_long_py(x, long* value, int* err) noexcept:
Possible errors when returning ``True``:
- ``0``: ``x`` was successfully converted to a C long and its value
is stored in ``*value``.
- ``0`` -- ``x`` was successfully converted to a C long and its value
is stored in ``*value``
- ``ERR_OVERFLOW``: ``x`` is a python object of type ``int`` but
too large to store in a C long.
- ``ERR_OVERFLOW`` -- ``x`` is a Python object of type ``int`` but
too large to store in a C long
Possible errors when returning ``False``:
- ``ERR_TYPE``: ``x`` is not a python object of type ``int``.
- ``ERR_TYPE`` -- ``x`` is not a Python object of type ``int``
EXAMPLES:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/calculus/riemann.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ cdef class Riemann_Map:
run slowly.
- only for multiply connected domains
- ``min_mag`` -- float (default: ``0.001``); the magnitude cutoff
- ``min_mag`` -- float (default: `0.001`); the magnitude cutoff
below which spiderweb points are not drawn. This only applies
to multiply connected domains and is designed to prevent
"fuzz" at the edge of the domain. Some complicated multiply
Expand Down
14 changes: 7 additions & 7 deletions src/sage/categories/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ class Category(UniqueRepresentation, SageObject):
r"""
The base class for modeling mathematical categories, like for example:
- ``Groups()``: the category of groups
- ``EuclideanDomains()``: the category of euclidean rings
- ``VectorSpaces(QQ)``: the category of vector spaces over the field of
- ``Groups()`` -- the category of groups
- ``EuclideanDomains()`` -- the category of euclidean rings
- ``VectorSpaces(QQ)`` -- the category of vector spaces over the field of
rationals
See :mod:`sage.categories.primer` for an introduction to
Expand Down Expand Up @@ -200,10 +200,10 @@ class inheritance from ``C.parent_class``.
We define a hierarchy of four categories ``As()``, ``Bs()``,
``Cs()``, ``Ds()`` with a diamond inheritance. Think for example:
- ``As()``: the category of sets
- ``Bs()``: the category of additive groups
- ``Cs()``: the category of multiplicative monoids
- ``Ds()``: the category of rings
- ``As()`` -- the category of sets
- ``Bs()`` -- the category of additive groups
- ``Cs()`` -- the category of multiplicative monoids
- ``Ds()`` -- the category of rings
::
Expand Down
12 changes: 6 additions & 6 deletions src/sage/categories/covariant_functorial_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def category_from_categories(self, categories):
INPUT:
- ``self``: a functor `F`
- ``categories``: a non empty tuple of categories
- ``self`` -- a functor `F`
- ``categories`` -- a non empty tuple of categories
EXAMPLES::
Expand All @@ -182,8 +182,8 @@ def category_from_category(self, category):
INPUT:
- ``self``: a functor `F`
- ``category``: a category
- ``self`` -- a functor `F`
- ``category`` -- a category
EXAMPLES::
Expand All @@ -209,8 +209,8 @@ def __call__(self, args, **kwargs):
INPUT:
- ``self``: a covariant functorial construction `F`
- ``args``: a tuple (or iterable) of parents or elements
- ``self`` -- a covariant functorial construction `F`
- ``args`` -- a tuple (or iterable) of parents or elements
Returns `F(args)`
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def braid_orbit(self, word):
INPUT:
- ``word``: a list (or iterable) of indices in
- ``word`` -- a list (or iterable) of indices in
``self.index_set()``
OUTPUT:
Expand Down
18 changes: 9 additions & 9 deletions src/sage/categories/enumerated_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,36 @@ class EnumeratedSets(CategoryWithAxiom):
The standard methods for an enumerated set ``S`` are:
- ``S.cardinality()``: the number of elements of the set. This
- ``S.cardinality()`` -- the number of elements of the set. This
is the equivalent for ``len`` on a list except that the
return value is specified to be a Sage :class:`Integer` or
``infinity``, instead of a Python ``int``.
- ``iter(S)``: an iterator for the elements of the set;
- ``iter(S)`` -- an iterator for the elements of the set;
- ``S.list()``: a fresh list of the elements of the set, when
- ``S.list()`` -- a fresh list of the elements of the set, when
possible; raises a :class:`NotImplementedError` if the list is
predictably too large to be expanded in memory.
- ``S.tuple()``: a tuple of the elements of the set, when
- ``S.tuple()`` -- a tuple of the elements of the set, when
possible; raises a :class:`NotImplementedError` if the tuple is
predictably too large to be expanded in memory.
- ``S.unrank(n)``: the ``n``-th element of the set when ``n`` is a sage
- ``S.unrank(n)`` -- the ``n``-th element of the set when ``n`` is a sage
``Integer``. This is the equivalent for ``l[n]`` on a list.
- ``S.rank(e)``: the position of the element ``e`` in the set;
- ``S.rank(e)`` -- the position of the element ``e`` in the set;
This is equivalent to ``l.index(e)`` for a list except that
the return value is specified to be a Sage :class:`Integer`,
instead of a Python ``int``.
- ``S.first()``: the first object of the set; it is equivalent to
- ``S.first()`` -- the first object of the set; it is equivalent to
``S.unrank(0)``.
- ``S.next(e)``: the object of the set which follows ``e``; it is
- ``S.next(e)`` -- the object of the set which follows ``e``; it is
equivalent to ``S.unrank(S.rank(e) + 1)``.
- ``S.random_element()``: a random generator for an element of
- ``S.random_element()`` -- a random generator for an element of
the set. Unless otherwise stated, and for finite enumerated
sets, the probability is uniform.
Expand Down
10 changes: 5 additions & 5 deletions src/sage/categories/finite_posets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1507,15 +1507,15 @@ def toggling_orbits(self, vs, element_constructor=set):
INPUT:
- ``vs``: a list (or other iterable) of elements of ``self``
- ``vs`` -- a list (or other iterable) of elements of ``self``
(but since the output depends on the order, sets should
not be used as ``vs``).
OUTPUT:
- a partition of the order ideals of ``self``, as a list of
sets ``L`` such that for each ``L`` and ``i``, cyclically:
``self.order_ideal_toggles(L[i], vs) == L[i+1]``.
A partition of the order ideals of ``self``, as a list of
sets ``L`` such that for each ``L`` and ``i``, cyclically:
``self.order_ideal_toggles(L[i], vs) == L[i+1]``.
EXAMPLES::
Expand Down Expand Up @@ -1778,7 +1778,7 @@ def toggling_orbit_iter(self, vs, oideal, element_constructor=set, stop=True, ch
INPUT:
- ``vs``: a list (or other iterable) of elements of ``self``
- ``vs`` -- list (or other iterable) of elements of ``self``
(but since the output depends on the order, sets should
not be used as ``vs``).
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/finitely_generated_semigroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def succ_generators(self, side='twosided'):
INPUT:
- ``side``: "left", "right", or "twosided"
- ``side`` -- ``'left'``, ``'right'``, or ``'twosided'`` (default)
.. TODO:: Design choice:
Expand Down
8 changes: 3 additions & 5 deletions src/sage/categories/functor.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,15 @@ cdef class Functor(SageObject):
Instead, one should implement three methods, which are composed in the
default call method:
- ``_coerce_into_domain(self, x)``: Return an object of ``self``'s
- ``_coerce_into_domain(self, x)`` -- return an object of ``self``'s
domain, corresponding to ``x``, or raise a :class:`TypeError`.
- Default: Raise :class:`TypeError` if ``x`` is not in ``self``'s domain.
- ``_apply_functor(self, x)``: Apply ``self`` to an object ``x`` of
- ``_apply_functor(self, x)`` -- apply ``self`` to an object ``x`` of
``self``'s domain.
- Default: Conversion into ``self``'s codomain.
- ``_apply_functor_to_morphism(self, f)``: Apply ``self`` to a morphism
- ``_apply_functor_to_morphism(self, f)`` -- apply ``self`` to a morphism
``f`` in ``self``'s domain.
- Default: Return ``self(f.domain()).hom(f,self(f.codomain()))``.
Expand Down
6 changes: 3 additions & 3 deletions src/sage/categories/map.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1499,9 +1499,9 @@ cdef class FormalCompositeMap(Map):
"""
INPUT:
- ``parent``: a homset
- ``first``: a map or a list of maps
- ``second``: a map or None
- ``parent`` -- a homset
- ``first`` -- a map or a list of maps
- ``second`` -- a map or None
.. NOTE::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/regular_supercrystals.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class RegularSuperCrystals(Category_singleton):
- either an attribute ``_cartan_type`` or a method ``cartan_type``
- ``module_generators``: a list (or container) of distinct elements
- ``module_generators`` -- a list (or container) of distinct elements
that generate the crystal using `f_i` and `e_i`
Furthermore, their elements ``x`` should implement the following
Expand Down
26 changes: 13 additions & 13 deletions src/sage/combinat/cluster_algebra_quiver/cluster_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2281,25 +2281,25 @@ def mutate(self, sequence, inplace=True, input_type=None):
Possible values for vertex types in ``sequence`` are:
- ``'first_source'``: mutates at first found source vertex,
- ``'sources'``: mutates at all sources,
- ``'first_sink'``: mutates at first sink,
- ``'sinks'``: mutates at all sink vertices,
- ``'green'``: mutates at the first green vertex,
- ``'red'``: mutates at the first red vertex,
- ``'urban_renewal'`` or ``'urban'``: mutates at first urban renewal vertex,
- ``'all_urban_renewals'`` or ``'all_urban'``: mutates at all
urban renewal vertices.
- ``'first_source'`` -- mutates at first found source vertex
- ``'sources'`` -- mutates at all sources
- ``'first_sink'`` -- mutates at first sink
- ``'sinks'`` -- mutates at all sink vertices
- ``'green'`` -- mutates at the first green vertex
- ``'red'`` -- mutates at the first red vertex
- ``'urban_renewal'`` or ``'urban'`` -- mutates at first urban renewal vertex
- ``'all_urban_renewals'`` or ``'all_urban'`` -- mutates at all
urban renewal vertices
For ``input_type``, if no value is given, preference will
be given to vertex names, then indices, then cluster variables.
If all input is not of the same type, an error is given.
Possible values for ``input_type`` are:
- ``'vertices'``: interprets the input sequence as vertices
- ``'indices'``: interprets the input sequence as indices
- ``'cluster_vars'``: interprets the input sequence as cluster variables
this must be selected if inputting a sequence of cluster variables.
- ``'vertices'`` -- interprets the input sequence as vertices
- ``'indices'`` -- interprets the input sequence as indices
- ``'cluster_vars'`` -- interprets the input sequence as cluster variables.
This must be selected if inputting a sequence of cluster variables.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/e_one_star.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ def repaint(self, cmap='Set1') -> None:
- ``cmap`` -- color map (default: ``'Set1'``). It can be one of the
following:
- ``string`` -- A coloring map. For available coloring map names type:
- ``string`` -- a coloring map; for available coloring map names type:
``sorted(colormaps)``
- ``list`` -- list of colors to assign cyclically to the faces
A list of a single color colors all the faces with the same color
Expand Down
Loading

0 comments on commit 055b9cf

Please sign in to comment.