Skip to content

Commit

Permalink
Docstring edits
Browse files Browse the repository at this point in the history
self to ``self``
  • Loading branch information
gmou3 committed Jun 15, 2024
1 parent 19b9da5 commit e2b4155
Show file tree
Hide file tree
Showing 87 changed files with 275 additions and 274 deletions.
4 changes: 2 additions & 2 deletions src/sage/algebras/commutative_dga.py
Original file line number Diff line number Diff line change
Expand Up @@ -2874,12 +2874,12 @@ def extendy(phi, degree):
def cohomology_algebra(self, max_degree=3):
"""
Compute a CDGA with trivial differential, that is isomorphic to the cohomology of
self up to``max_degree``
``self`` up to``max_degree``
INPUT:
- ``max_degree`` -- integer (default: `3`); degree to which the result is required to
be isomorphic to self's cohomology.
be isomorphic to ``self``'s cohomology
EXAMPLES::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/free_algebra_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, A, x):

def _repr_(self):
"""
Return string representation of self.
Return string representation of ``self``.
EXAMPLES::
Expand All @@ -109,7 +109,7 @@ def _repr_(self):

def _latex_(self):
r"""
Return latex representation of self.
Return latex representation of ``self``.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/free_algebra_quotient_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _richcmp_(self, right, op):

def __neg__(self):
"""
Return negative of self.
Return negative of ``self``.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/free_zinbiel_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def _coerce_map_from_(self, R):
The things that coerce into ``self`` are
- free Zinbiel algebras whose set `E` of labels is
a subset of the corresponding self of ``set`, and whose base
a subset of the corresponding ``self`` of ``set`, and whose base
ring has a coercion map into ``self.base_ring()``

This comment has been minimized.

Copy link
@kwankyu

kwankyu Jun 20, 2024

Collaborator
``set``
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/hecke_algebras/cubic_hecke_base_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ def mirror_involution(self):
def create_specialization(self, im_cubic_equation_roots, im_writhe_parameter=None, var='T', third_unity_root_name='E3'):
r"""
Return an appropriate ring containing the elements from the list
``im_cubic_equation_roots`` defining a conversion map from self mapping
``im_cubic_equation_roots`` defining a conversion map from ``self`` mapping
the cubic equation roots of ``self`` to ``im_cubic_equation_roots``.
INPUT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):

def lm_divides(self, FreeAlgebraElement_letterplace p):
"""
Tell whether or not the leading monomial of self divides the
Tell whether or not the leading monomial of ``self`` divides the
leading monomial of another element.
.. NOTE::
Expand Down
6 changes: 3 additions & 3 deletions src/sage/algebras/letterplace/free_algebra_letterplace.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -697,14 +697,14 @@ cdef class FreeAlgebra_letterplace(Parent):
# Coercion
cpdef _coerce_map_from_(self, S):
"""
A ring ``R`` coerces into self, if
A ring ``R`` coerces into ``self``, if
- it coerces into the current polynomial ring, or
- it is a free graded algebra in letterplace implementation,
the generator names of ``R`` are a proper subset of the
generator names of self, the degrees of equally named
generator names of ``self``, the degrees of equally named
generators are equal, and the base ring of ``R`` coerces
into the base ring of self.
into the base ring of ``self``.
TESTS:
Expand Down
14 changes: 7 additions & 7 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ def is_definite(self):

def __eq__(self, other):
"""
Compare self and other.
Compare ``self`` and ``other``.
EXAMPLES::
Expand All @@ -1085,7 +1085,7 @@ def __eq__(self, other):

def __ne__(self, other):
"""
Compare self and other.
Compare ``self`` and ``other``.
EXAMPLES::
Expand Down Expand Up @@ -2922,12 +2922,12 @@ def __hash__(self):
@cached_method
def basis_matrix(self):
r"""
Return basis matrix `M` in Hermite normal form for self as a
Return basis matrix `M` in Hermite normal form for ``self`` as a
matrix with rational entries.
If `Q` is the ambient quaternion algebra, then the `\ZZ`-span of
the rows of `M` viewed as linear combinations of Q.basis() =
`[1,i,j,k]` is the fractional ideal self. Also,
`[1,i,j,k]` is the fractional ideal ``self``. Also,
``M * M.denominator()`` is an integer matrix in Hermite normal form.
OUTPUT: matrix over `\QQ`
Expand Down Expand Up @@ -3328,7 +3328,7 @@ def free_module(self):

def intersection(self, J):
"""
Return the intersection of the ideals self and `J`.
Return the intersection of the ideals ``self`` and `J`.
EXAMPLES::
Expand All @@ -3344,7 +3344,7 @@ def intersection(self, J):

def multiply_by_conjugate(self, J):
"""
Return product of self and the conjugate Jbar of `J`.
Return product of ``self`` and the conjugate Jbar of `J`.
INPUT:
Expand Down Expand Up @@ -3778,7 +3778,7 @@ def cyclic_right_subideals(self, p, alpha=None):
:class:`NotImplementedError` is raised. In particular, `p` must
be odd and unramified in the quaternion algebra, must be
coprime to the index of the right order in the maximal
order, and also coprime to the normal of self. (The Brandt
order, and also coprime to the normal of ``self``. (The Brandt
modules code has a more general algorithm in some cases.)
EXAMPLES::
Expand Down
30 changes: 15 additions & 15 deletions src/sage/algebras/quatalg/quaternion_algebra_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement):

cpdef _div_(self, right):
"""
Return quotient of self by right.
Return quotient of ``self`` by ``right``.
EXAMPLES::
Expand Down Expand Up @@ -585,15 +585,15 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement):

def matrix(self, action='right'):
"""
Return the matrix of right or left multiplication of self on
Return the matrix of right or left multiplication of ``self`` on
the basis for the ambient quaternion algebra.
In particular, if action is 'right' (the default), returns the
matrix of the mapping sending x to x*self.
In particular, if action is ``'right'`` (the default), returns the
matrix of the mapping sending ``x`` to ``x*self``.
INPUT:
- ``action`` -- (default: ``'right'``) 'right' or 'left'.
- ``action`` -- (default: ``'right'``) ``'right'`` or ``'left'``
OUTPUT: a matrix
Expand Down Expand Up @@ -659,9 +659,9 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement):

def pair(self, right):
"""
Return the result of pairing self and right, which should both
Return the result of pairing ``self`` and ``right``, which should both
be elements of a quaternion algebra. The pairing is
(x,y) = (x.conjugate()*y).reduced_trace().
``(x,y) = (x.conjugate()*y).reduced_trace()``.
INPUT:
Expand Down Expand Up @@ -794,7 +794,7 @@ cdef class QuaternionAlgebraElement_generic(QuaternionAlgebraElement_abstract):

cpdef _add_(self, _right):
"""
Return the sum of self and _right.
Return the sum of ``self`` and ``_right``.
EXAMPLES::
Expand All @@ -810,7 +810,7 @@ cdef class QuaternionAlgebraElement_generic(QuaternionAlgebraElement_abstract):

cpdef _sub_(self, _right):
"""
Return the difference of self and _right.
Return the difference of ``self`` and ``_right``.
EXAMPLES::
Expand All @@ -825,7 +825,7 @@ cdef class QuaternionAlgebraElement_generic(QuaternionAlgebraElement_abstract):

cpdef _mul_(self, _right):
"""
Return the product of self and _right.
Return the product of ``self`` and ``_right``.
EXAMPLES::
Expand Down Expand Up @@ -1432,7 +1432,7 @@ cdef class QuaternionAlgebraElement_rational_field(QuaternionAlgebraElement_abst
"""
Return the reduced trace of ``self``.
This is `2x` if self is `x+iy+zj+wk`.
This is `2x` if ``self`` is `x+iy+zj+wk`.
EXAMPLES::
Expand Down Expand Up @@ -1598,7 +1598,7 @@ cdef class QuaternionAlgebraElement_rational_field(QuaternionAlgebraElement_abst

def _multiply_by_integer(self, Integer n):
"""
Return the product of self times the integer n.
Return the product of ``self`` times the integer `n`.
EXAMPLES::
Expand Down Expand Up @@ -1635,7 +1635,7 @@ cdef class QuaternionAlgebraElement_rational_field(QuaternionAlgebraElement_abst

def _divide_by_integer(self, Integer n):
"""
Return the quotient of self by the integer n.
Return the quotient of ``self`` by the integer `n`.
EXAMPLES::
Expand Down Expand Up @@ -1806,7 +1806,7 @@ cdef class QuaternionAlgebraElement_number_field(QuaternionAlgebraElement_abstra

cpdef _add_(self, _right):
"""
Add self and _right:
Add ``self`` and ``_right``:
EXAMPLES::
Expand Down Expand Up @@ -1931,7 +1931,7 @@ cdef class QuaternionAlgebraElement_number_field(QuaternionAlgebraElement_abstra

cpdef _mul_(self, _right):
"""
Multiply self and _right.
Multiply ``self`` and ``_right``.
EXAMPLES::
Expand Down
10 changes: 5 additions & 5 deletions src/sage/algebras/steenrod/steenrod_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ def _element_constructor_(self, x):

def __contains__(self, x):
r"""
Return ``True`` if self contains `x`.
Return ``True`` if ``self`` contains `x`.
EXAMPLES::
Expand Down Expand Up @@ -3193,7 +3193,7 @@ def is_homogeneous(self):

def degree(self):
r"""
The degree of self.
The degree of ``self``.
The degree of `\text{Sq}(i_1,i_2,i_3,...)` is
Expand Down Expand Up @@ -3287,9 +3287,9 @@ def change_basis(self, basis='milnor'):
INPUT:
- ``basis`` -- string, basis in which to work
- ``basis`` -- string; basis in which to work
OUTPUT: representation of self in given basis
OUTPUT: representation of ``self`` in given basis
The choices for ``basis`` are:
Expand Down Expand Up @@ -3331,7 +3331,7 @@ def change_basis(self, basis='milnor'):

def _basis_dictionary(self, basis):
r"""
Convert self to ``basis``, returning a dictionary of terms of
Convert ``self`` to ``basis``, returning a dictionary of terms of
the form (mono: coeff), where mono is a monomial in the given
basis.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/calculus/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def limit(f, dir=None, taylor=False, **argv):

def taylor(f, *args):
"""
Expands self in a truncated Taylor or Laurent series in the
Expand ``self`` in a truncated Taylor or Laurent series in the
variable `v` around the point `a`, containing terms
through `(x - a)^n`. Functions in more variables are also
supported.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/additive_magmas.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ class ParentMethods:

def _test_zero(self, **options):
r"""
Test that ``self.zero()`` is an element of self and
Test that ``self.zero()`` is an element of ``self`` and
is neutral for the addition.
INPUT:
Expand Down
6 changes: 3 additions & 3 deletions src/sage/categories/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ def required_methods(self):
# Operations on the lattice of categories
def is_subcategory(self, c):
"""
Return ``True`` if self is naturally embedded as a subcategory of `c`.
Return ``True`` if ``self`` is naturally embedded as a subcategory of `c`.
EXAMPLES::
Expand Down Expand Up @@ -1876,7 +1876,7 @@ def _is_subclass(self, c):
@cached_method
def _meet_(self, other):
"""
Return the largest common subcategory of self and other.
Return the largest common subcategory of ``self`` and ``other``.
EXAMPLES::
Expand Down Expand Up @@ -1909,7 +1909,7 @@ def _meet_(self, other):
distributivity.
For the meet computation, there may be several lowest common
sub categories of self and other, in which case, we need to
sub categories of ``self`` and ``other``, in which case, we need to
take the join of them all.
FIXME:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/category_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def _subcategory_hook_(self, C):
OUTPUT:
A boolean if it is certain that ``C`` is (or is not) a
subcategory of self. :obj:`~sage.misc.unknown.Unknown`
subcategory of ``self``. :obj:`~sage.misc.unknown.Unknown`
otherwise.
EXAMPLES:
Expand Down
10 changes: 5 additions & 5 deletions src/sage/categories/coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def standard_coxeter_elements(self):
r"""
Return all standard Coxeter elements in ``self``.
This is the set of all elements in self obtained from any
This is the set of all elements in ``self`` obtained from any
product of the simple reflections in ``self``.
.. NOTE::
Expand Down Expand Up @@ -1312,7 +1312,7 @@ def _test_has_descent(self, **options):
"""
Run sanity checks on the method
:meth:`CoxeterGroups.ElementMethods.has_descent` of the
elements of self.
elements of ``self``.
EXAMPLES::
Expand Down Expand Up @@ -1424,7 +1424,7 @@ def _test_coxeter_relations(self, **options):
class ElementMethods:
def has_descent(self, i, side='right', positive=False):
"""
Return whether i is a (left/right) descent of self.
Return whether `i` is a (left/right) descent of ``self``.
See :meth:`.descents` for a description of the options.
Expand Down Expand Up @@ -1456,7 +1456,7 @@ def has_descent(self, i, side='right', positive=False):
# @abstract_method(optional = True)
def has_right_descent(self, i):
"""
Return whether ``i`` is a right descent of self.
Return whether `i` is a right descent of ``self``.
EXAMPLES::
Expand All @@ -1475,7 +1475,7 @@ def has_right_descent(self, i):

def has_left_descent(self, i):
"""
Return whether `i` is a left descent of self.
Return whether `i` is a left descent of ``self``.
This default implementation uses that a left descent of
`w` is a right descent of `w^{-1}`.
Expand Down
Loading

1 comment on commit e2b4155

@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.