Skip to content

Commit

Permalink
Docstring suggestions by kwankyu
Browse files Browse the repository at this point in the history
  • Loading branch information
gmou3 committed Jun 21, 2024
1 parent d7d1ce3 commit e5b7753
Show file tree
Hide file tree
Showing 77 changed files with 305 additions and 400 deletions.
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()``
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 @@ -150,7 +150,7 @@ cdef MPolynomialRing_libsingular make_letterplace_ring(base_ring, blocks):
INPUT:
- ``base_ring`` -- a multivariate polynomial ring
- ``blocks`` -- the number of blocks to be formeds
- ``blocks`` -- the number of blocks to be formed
OUTPUT:
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/schur_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,10 @@ def GL_irreducible_character(n, mu, KK):
INPUT:
- ``n`` -- positive integer
- ``mu`` -- a partition of at most ``n`` parts
- ``mu`` -- a partition of at most `n` parts
- ``KK`` -- a field
OUTPUT: a symmetric function which should be interpreted in ``n``
OUTPUT: a symmetric function which should be interpreted in `n`
variables to be meaningful as a character
EXAMPLES:
Expand Down
6 changes: 3 additions & 3 deletions src/sage/arith/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2820,9 +2820,9 @@ def odd_part(n):

def prime_to_m_part(n, m):
"""
Return the prime-to-``m`` part of ``n``.
Return the prime-to-`m` part of `n`.
This is the largest divisor of ``n`` that is coprime to ``m``.
This is the largest divisor of `n` that is coprime to `m`.
INPUT:
Expand Down Expand Up @@ -3029,7 +3029,7 @@ class Euler_Phi:
sage: euler_phi(37) # needs sage.libs.pari
36
Notice that euler_phi is defined to be 0 on negative numbers and 0::
Notice that ``euler_phi`` is defined to be 0 on negative numbers and 0::
sage: euler_phi(-1)
0
Expand Down
8 changes: 4 additions & 4 deletions src/sage/calculus/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ def limit(f, dir=None, taylor=False, **argv):
INPUT:
- ``dir`` -- (default: ``None``); dir may have the value
'plus' (or 'above') for a limit from above, 'minus' (or 'below')
for a limit from below, or may be omitted (implying a two-sided
limit is to be computed).
- ``dir`` -- (default: ``None``); dir may have the value ``'plus'`` (or
``'above'``) for a limit from above, ``'minus'`` (or ``'below'``) for a
limit from below, or may be omitted (implying a two-sided limit is to be
computed).
- ``taylor`` -- (default: ``False``); if ``True``, use Taylor
series, which allows more limits to be computed (but may also
Expand Down
14 changes: 7 additions & 7 deletions src/sage/calculus/riemann.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -847,13 +847,13 @@ cdef class Riemann_Map:
The following inputs may be passed in as named parameters:
- ``spokes`` -- integer (default: `16`); the number of equally
- ``spokes`` -- integer (default: 16); the number of equally
spaced radial lines to plot
- ``circles`` -- integer (default: `4`); the number of equally
- ``circles`` -- integer (default: 4); the number of equally
spaced circles about the center to plot
- ``pts`` -- integer (default: `32`); the number of points to
- ``pts`` -- integer (default: 32); the number of points to
plot. Each radial line is made by ``1*pts`` points, each circle
has ``2*pts`` points. Note that high values may cause erratic
behavior of the radial lines near the boundaries.
Expand All @@ -866,7 +866,7 @@ cdef class Riemann_Map:
- ``rgbcolor`` -- float array (default: ``[0,0,0]``); the
red-green-blue color of the spiderweb
- ``thickness`` -- positive float (default: `1`); the thickness of
- ``thickness`` -- positive float (default: 1); the thickness of
the lines or points in the spiderweb
- ``plotjoined`` -- boolean (default: ``True``); if ``False``,
Expand All @@ -877,13 +877,13 @@ cdef class Riemann_Map:
- ``withcolor`` -- boolean (default: ``False``); if ``True``,
the spiderweb will be overlaid on the basic color plot
- ``plot_points`` -- integer (default: `200`); the size of the grid
- ``plot_points`` -- integer (default: 200); the size of the grid
in the x direction. The number of points in the y_direction is scaled
accordingly. Note that very large values can cause this function to
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 Expand Up @@ -1013,7 +1013,7 @@ cdef class Riemann_Map:
``(xmin, xmax, ymin, ymax)``. Declare if you do not want the plot
to use the default range for the figure.
- ``plot_points`` -- integer (default: `100`); number of points to
- ``plot_points`` -- integer (default: 100); number of points to
plot in the x direction. Points in the y direction are scaled
accordingly. Note that very large values can cause this function to
run slowly.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/modules_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ def random_element(self, n=2):
ALGORITHM:
Return a sum of ``n`` terms, each of which is formed by
Return a sum of `n` terms, each of which is formed by
multiplying a random element of the base ring by a random
element of the group.
Expand Down
4 changes: 2 additions & 2 deletions src/sage/coding/linear_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,8 +1428,8 @@ def _minimum_weight_codeword(self, algorithm=None):
- ``algorithm`` -- (default: ``None``) the name of the algorithm to use
to perform minimum weight codeword search. If set to ``None``,
a search using GAP methods will be done. ``algorithm`` can be:
- ``'guava'``, which will use optional GAP package Guava
a search using GAP methods will be done. ``algorithm`` can be
``'guava'``, which will use the optional GAP package Guava.
REMARKS:
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/binary_recurrence_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,8 @@ def _largest_ppower_divisor(N):

def _goodness(n, R, p):
"""
Return the goodness of ``n`` for the sequence ``R`` and the prime ``p`` -- that is the largest
non-``p`` prime power dividing ``period(n)``.
Return the goodness of `n` for the sequence `R` and the prime `p` -- that is the largest
non-`p` prime power dividing ``period(n)``.
INPUT:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,7 @@ def __iter__(self):

def composition_iterator_fast(n):
"""
Iterator over compositions of ``n`` yielded as lists.
Iterator over compositions of `n` yielded as lists.
TESTS::
Expand Down
22 changes: 10 additions & 12 deletions src/sage/combinat/designs/bibd.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,10 +765,9 @@ def v_4_1_BIBD(v, check=True):
- ``v`` -- integer; number of points
- ``check`` -- boolean; whether to check that output is correct before
returning it. As this is expected to be useless (but we are cautious
guys), you may want to disable it whenever you want speed. Set to ``True``
by default.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
EXAMPLES::
Expand Down Expand Up @@ -855,8 +854,8 @@ def BIBD_from_PBD(PBD, v, k, check=True, base_cases=None):
``PBD`` of size `s` there must exist a `((k-1)s+1,k,1)`-BIBD
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless (but we
are cautious guys), you may want to disable it whenever you want speed.
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
- ``base_cases`` -- caching system, for internal use
Expand Down Expand Up @@ -942,10 +941,9 @@ def PBD_4_5_8_9_12(v, check=True):
- ``v`` -- integer congruent to `0` or `1` modulo `4`
- ``check`` -- boolean; whether to check that output is correct before
returning it. As this is expected to be useless (but we are cautious
guys), you may want to disable it whenever you want speed. Set to ``True``
by default.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
EXAMPLES::
Expand Down Expand Up @@ -1556,8 +1554,8 @@ def arc(self, s=2, solver=None, verbose=0, *, integrality_tolerance=1e-3):
:class:`MixedIntegerLinearProgram
<sage.numerical.mip.MixedIntegerLinearProgram>`.
- ``verbose`` -- integer (default: `0`); sets the level of
verbosity. Set to `0` by default, which means quiet.
- ``verbose`` -- integer (default: 0); sets the level of
verbosity. Set to 0 by default, which means quiet.
- ``integrality_tolerance`` -- parameter for use with MILP solvers over
an inexact base ring; see
Expand Down
15 changes: 7 additions & 8 deletions src/sage/combinat/designs/block_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ def DesarguesianProjectivePlaneDesign(n, point_coordinates=True, check=True):
points with their homogeneous coordinates (default) or with integers
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless (but we
are cautious guys), you may want to disable it whenever you want speed.
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
.. SEEALSO::
Expand Down Expand Up @@ -520,10 +520,9 @@ def HughesPlane(q2, check=True):
- ``q2`` -- an even power of an odd prime number
- ``check`` -- boolean; whether to check that output is correct before
returning it. As this is expected to be useless (but we are cautious
guys), you may want to disable it whenever you want speed. Set to
``True`` by default.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
EXAMPLES::
Expand Down Expand Up @@ -638,8 +637,8 @@ def projective_plane_to_OA(pplane, pt=None, check=True):
then it is set to `n^2 + n`
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless (but we
are cautious guys), you may want to disable it whenever you want speed.
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
EXAMPLES::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/designs/difference_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def difference_matrix(g,k,lmbda=1,existence=False,check=True):
appears as a difference
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless (but we
are cautious guys), you may want to disable it whenever you want speed.
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
- ``existence`` -- boolean; instead of building the design, return:
Expand Down
14 changes: 6 additions & 8 deletions src/sage/combinat/designs/group_divisible_designs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ def group_divisible_design(v, K, G, existence=False, check=False):
- ``False`` -- meaning that the design does not exist
- ``check`` -- boolean; whether to check that output is correct before
returning it. As this is expected to be useless (but we are cautious
guys), you may want to disable it whenever you want speed. Set to ``True``
by default.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
.. NOTE::
Expand Down Expand Up @@ -150,10 +149,9 @@ def GDD_4_2(q, existence=False, check=True):
- ``False`` -- meaning that the design does not exist
- ``check`` -- boolean; whether to check that output is correct before
returning it. As this is expected to be useless (but we are cautious
guys), you may want to disable it whenever you want speed. Set to ``True``
by default.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
EXAMPLES::
Expand Down
11 changes: 5 additions & 6 deletions src/sage/combinat/designs/incidence_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1430,8 +1430,8 @@ def packing(self, solver=None, verbose=0, *, integrality_tolerance=1e-3):
:class:`MixedIntegerLinearProgram
<sage.numerical.mip.MixedIntegerLinearProgram>`.
- ``verbose`` -- integer (default: `0`); sets the level of
verbosity. Set to `0` by default, which means quiet.
- ``verbose`` -- integer (default: 0); sets the level of
verbosity. Set to 0 by default, which means quiet.
- ``integrality_tolerance`` -- parameter for use with MILP solvers over
an inexact base ring; see
Expand Down Expand Up @@ -1898,13 +1898,12 @@ def is_resolvable(self, certificate=False, solver=None, verbose=0, check=True,
:class:`MixedIntegerLinearProgram
<sage.numerical.mip.MixedIntegerLinearProgram>`.
- ``verbose`` -- integer (default: `0`); sets the level of
verbosity. Set to `0` by default, which means quiet.
- ``verbose`` -- integer (default: 0); sets the level of
verbosity. Set to 0 by default, which means quiet.
- ``check`` -- boolean (default: ``True``); whether to check that
output is correct before returning it. As this is expected to be
useless (but we are cautious guys), you may want to disable it
whenever you want speed.
useless, you may want to disable it whenever you want speed.
- ``integrality_tolerance`` -- parameter for use with MILP solvers over
an inexact base ring; see :meth:`MixedIntegerLinearProgram.get_values`
Expand Down
7 changes: 3 additions & 4 deletions src/sage/combinat/designs/latin_squares.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,9 @@ def mutually_orthogonal_latin_squares(k, n, partitions=False, check=True):
partitions satisfying this intersection property instead of the `k+2` MOLS
(though the data is exactly the same in both cases).
- ``check`` -- boolean; whether to check that output is correct before
returning it. As this is expected to be useless (but we are cautious
guys), you may want to disable it whenever you want speed. Set to
``True`` by default.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
EXAMPLES::
Expand Down
26 changes: 12 additions & 14 deletions src/sage/combinat/designs/orthogonal_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,9 @@ def transversal_design(k, n, resolvable=False, check=True, existence=False):
`n` classes of the resolvable design are obtained as the first `n` blocks,
then the next `n` blocks, etc ... Set to ``False`` by default.
- ``check`` -- boolean; whether to check that output is correct before
returning it. As this is expected to be useless (but we are cautious
guys), you may want to disable it whenever you want speed. Set to
``True`` by default.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
- ``existence`` -- boolean; instead of building the design, return:
Expand Down Expand Up @@ -533,8 +532,8 @@ def wilson_construction(OA,k,r,m,u,check=True,explain_construction=False):
the construction
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless (but we
are cautious guys), you may want to disable it whenever you want speed.
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
REFERENCE:
Expand Down Expand Up @@ -700,8 +699,8 @@ def TD_product(k,TD1,n1,TD2,n2, check=True):
- ``k``, ``n1``, ``n2`` -- integers
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless (but we are
cautious guys), you may want to disable it whenever you want speed.
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
.. NOTE::
Expand Down Expand Up @@ -761,8 +760,8 @@ def orthogonal_array(k,n,t=2,resolvable=False, check=True,existence=False,explai
etc.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless (but we
are cautious guys), you may want to disable it whenever you want speed.
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
- ``existence`` -- boolean; instead of building the design, return:
Expand Down Expand Up @@ -1623,10 +1622,9 @@ def OA_n_times_2_pow_c_from_matrix(k,c,G,A,Y,check=True):
- ``Y`` -- a vector with entries in `GF(2^c)`
- ``check`` -- boolean; whether to check that output is correct before
returning it. As this is expected to be useless (but we are cautious
guys), you may want to disable it whenever you want speed. Set to
``True`` by default.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
.. NOTE::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,9 @@ def construction_q_x(k, q, x, check=True, explain_construction=False):
- `OA(k,q)-q.OA(k,1)`
- `OA(k,x+2)`
- ``check`` -- boolean; whether to check that output is correct before
returning it. As this is expected to be useless (but we are cautious
guys), you may want to disable it whenever you want speed. Set to
``True`` by default.
- ``check`` -- boolean (default: ``True``); whether to check that output is
correct before returning it. As this is expected to be useless, you may
want to disable it whenever you want speed.
- ``explain_construction`` -- boolean; return a string describing
the construction
Expand Down
Loading

0 comments on commit e5b7753

Please sign in to comment.