diff --git a/src/sage/algebras/commutative_dga.py b/src/sage/algebras/commutative_dga.py index 8e24a8a4c91..1a72a48c14e 100644 --- a/src/sage/algebras/commutative_dga.py +++ b/src/sage/algebras/commutative_dga.py @@ -4173,7 +4173,7 @@ def exterior_algebra_basis(n, degrees): - ``degrees`` -- iterable of integers Return list of lists, each list representing exponents for the - corresponding generators. (So each list consists of 0's and 1's.) + corresponding generators. (So each list consists of 0s and 1s.) EXAMPLES:: diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx index ac2d71f0ee0..5b99c87dd17 100644 --- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx +++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx @@ -708,8 +708,8 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement): INPUT: - A twosided homogeneous ideal `I` of the parent `F` of - this element, `x`. + - ``I`` -- a twosided homogeneous ideal of the parent `F` of + this element, `x` OUTPUT: the normal form of `x` wrt. `I` diff --git a/src/sage/algebras/letterplace/letterplace_ideal.pyx b/src/sage/algebras/letterplace/letterplace_ideal.pyx index fea7a1b44c2..912499abb97 100644 --- a/src/sage/algebras/letterplace/letterplace_ideal.pyx +++ b/src/sage/algebras/letterplace/letterplace_ideal.pyx @@ -200,7 +200,7 @@ class LetterplaceIdeal(Ideal_nc): INPUT: - - ``degbound`` (optional integer, or Infinity): If it is provided, + - ``degbound`` -- optional integer, or Infinity; if it is provided, a Groebner basis at least out to that degree is returned. By default, the current degree bound of the underlying ring is used. diff --git a/src/sage/algebras/quantum_groups/fock_space.py b/src/sage/algebras/quantum_groups/fock_space.py index a95a912d7de..8a7ce3e9386 100644 --- a/src/sage/algebras/quantum_groups/fock_space.py +++ b/src/sage/algebras/quantum_groups/fock_space.py @@ -2020,7 +2020,7 @@ def _A_to_fock_basis(self, la): # For non-interior partitions # Construct the d's and the partition ``a`` - a = list(la) + [0]*(k - 1 - len(la)) # Add 0's to get the correct length + a = list(la) + [0]*(k - 1 - len(la)) # Add 0s to get the correct length a = [a[i] + (k - 1 - i) for i in range(k-1)] # Shift the diagram #shifted = list(a) # Make a copy of the shifted partition in case we need it later d = [(a[i] - a[i+1]) % n for i in range(k-2)] diff --git a/src/sage/algebras/quantum_matrix_coordinate_algebra.py b/src/sage/algebras/quantum_matrix_coordinate_algebra.py index 97e26456020..9ddde4376c8 100644 --- a/src/sage/algebras/quantum_matrix_coordinate_algebra.py +++ b/src/sage/algebras/quantum_matrix_coordinate_algebra.py @@ -983,7 +983,7 @@ def _generator_key(t): INPUT: - a tuple (index, exponent) + - ``t`` -- tuple (index, exponent) OUTPUT: a tuple made from the index only diff --git a/src/sage/algebras/steenrod/steenrod_algebra.py b/src/sage/algebras/steenrod/steenrod_algebra.py index fdfda62eca1..7e4c3dc014f 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra.py +++ b/src/sage/algebras/steenrod/steenrod_algebra.py @@ -2400,7 +2400,7 @@ def Q_exp(self, *nums): """ if not all(x in (0, 1) for x in nums): raise ValueError("The tuple %s should consist " % (nums,) + - "only of 0's and 1's") + "only of 0s and 1s") else: if self.basis_name() != 'milnor': return self(SteenrodAlgebra(p=self.prime(), @@ -4022,7 +4022,7 @@ def SteenrodAlgebra(p=2, basis='milnor', generic='auto', **kwds): following:: sage: A2 = SteenrodAlgebra(profile=[3,2,1]) - sage: B2 = SteenrodAlgebra(profile=[3,2,1,0,0]) # trailing 0's ignored + sage: B2 = SteenrodAlgebra(profile=[3,2,1,0,0]) # trailing 0s ignored sage: A2 == B2 True sage: C2 = SteenrodAlgebra(profile=lambda n: max(4-n, 0), truncation_type=0) diff --git a/src/sage/calculus/desolvers.py b/src/sage/calculus/desolvers.py index 691ac33870d..48dad835671 100644 --- a/src/sage/calculus/desolvers.py +++ b/src/sage/calculus/desolvers.py @@ -1391,7 +1391,7 @@ def desolve_system_rk4(des, vars, ics=None, ivar=None, end_points=None, step=0.1 INPUT: - input is similar to desolve_system and desolve_rk4 commands + Input is similar to ``desolve_system`` and ``desolve_rk4`` commands - ``des`` -- right hand sides of the system diff --git a/src/sage/categories/finite_posets.py b/src/sage/categories/finite_posets.py index a5d1109f783..95102aa2395 100644 --- a/src/sage/categories/finite_posets.py +++ b/src/sage/categories/finite_posets.py @@ -1360,10 +1360,10 @@ def panyushev_orbits(self, element_constructor=set): INPUT: - - ``element_constructor`` (defaults to ``set``) -- a type + - ``element_constructor`` -- (default: ``set``) a type constructor (``set``, ``tuple``, ``list``, ``frozenset``, ``iter``, etc.) which is to be applied to the antichains - before they are returned. + before they are returned OUTPUT: @@ -1422,10 +1422,10 @@ def rowmotion_orbits(self, element_constructor=set): INPUT: - - ``element_constructor`` (defaults to ``set``) -- a type + - ``element_constructor`` -- (default: ``set``) a type constructor (``set``, ``tuple``, ``list``, ``frozenset``, ``iter``, etc.) which is to be applied to the antichains - before they are returned. + before they are returned OUTPUT: diff --git a/src/sage/categories/functor.pyx b/src/sage/categories/functor.pyx index 20c01456c7b..3fc2cbf1c0d 100644 --- a/src/sage/categories/functor.pyx +++ b/src/sage/categories/functor.pyx @@ -629,7 +629,7 @@ def IdentityFunctor(C): INPUT: - A category, ``C``. + - ``C`` -- a category OUTPUT: the identity functor in ``C`` diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx index a8949543e28..0761357f3f8 100644 --- a/src/sage/categories/map.pyx +++ b/src/sage/categories/map.pyx @@ -1357,7 +1357,7 @@ cdef class Section(Map): """ INPUT: - A map. + - ``map`` -- a map TESTS:: diff --git a/src/sage/categories/pushout.py b/src/sage/categories/pushout.py index b37ef99b8c2..dbe36f1f96a 100644 --- a/src/sage/categories/pushout.py +++ b/src/sage/categories/pushout.py @@ -4749,7 +4749,7 @@ def construction_tower(R): INPUT: - An object + - ``R`` -- an object OUTPUT: @@ -4788,7 +4788,8 @@ def expand_tower(tower): INPUT: - A construction tower as returned by :func:`construction_tower`. + - ``tower`` -- a construction tower as returned by + :func:`construction_tower` OUTPUT: a new construction tower with all the construction functors expanded @@ -4826,7 +4827,7 @@ def type_to_parent(P): INPUT: - A type + - ``P`` -- a type OUTPUT: a Sage parent structure corresponding to the given type diff --git a/src/sage/categories/simplicial_sets.py b/src/sage/categories/simplicial_sets.py index fea959ae79e..ffa90a3153f 100644 --- a/src/sage/categories/simplicial_sets.py +++ b/src/sage/categories/simplicial_sets.py @@ -278,7 +278,7 @@ def fundamental_group(self, simplify=True): INPUT: - - ``simplify`` (bool, optional ``True``) -- if + - ``simplify`` -- boolean (default: ``True``); if ``False``, then return a presentation of the group in terms of generators and relations. If ``True``, the default, simplify as much as GAP is able to. diff --git a/src/sage/coding/binary_code.pyx b/src/sage/coding/binary_code.pyx index a8148198728..3c73e0f7176 100644 --- a/src/sage/coding/binary_code.pyx +++ b/src/sage/coding/binary_code.pyx @@ -1019,9 +1019,9 @@ cdef class BinaryCode: def _word(self, coords): """ - Considering coords as an integer in binary, think of the 0's and 1's as - coefficients of the basis given by self.matrix(). This function returns - a string representation of that word. + Considering ``coords`` as an integer in binary, think of the 0s and 1s + as coefficients of the basis given by ``self.matrix()``. This function + returns a string representation of that word. EXAMPLES:: @@ -3148,14 +3148,15 @@ cdef class BinaryCodeClassifier: - ``verbosity`` -- nonnegative integer OUTPUT: - a tuple, (gens, labeling, size, base) - gens -- list of permutations (in list form) representing generators - of the permutation automorphism group of the code CC. - labeling -- a permutation representing the canonical labeling of the - code. mostly for internal use; entries describe the relabeling - on the columns. - size -- the order of the automorphism group. - base -- a set of cols whose action determines the action on all cols + + a tuple, (gens, labeling, size, base) + - gens; list of permutations (in list form) representing generators + of the permutation automorphism group of the code CC + - labeling; a permutation representing the canonical labeling of the + code. mostly for internal use; entries describe the relabeling + on the columns. + - size; the order of the automorphism group + - base; a set of cols whose action determines the action on all cols EXAMPLES:: diff --git a/src/sage/coding/self_dual_codes.py b/src/sage/coding/self_dual_codes.py index e156ca5d05a..6fefba3d2b1 100644 --- a/src/sage/coding/self_dual_codes.py +++ b/src/sage/coding/self_dual_codes.py @@ -54,10 +54,10 @@ case: For even `m`, let `A_m` denote the `m\times m` matrix over `\GF{2}` -given by adding the all 1's matrix to the identity matrix (in +given by adding the all 1s matrix to the identity matrix (in ``MatrixSpace(GF(2),m,m)`` of course). If `M_1, ..., M_r` are square matrices, let `diag(M_1,M_2,...,M_r)` denote the "block diagonal" -matrix with the matrices `M_i` on the diagonal and 0's elsewhere. Let +matrix with the matrices `M_i` on the diagonal and 0s elsewhere. Let `C(m_1,...,m_r,s)` denote the linear code with generator matrix having block form `G = (I, A)`, where `A = diag(A_{m_1},A_{m_2},...,A_{m_r},I_s)`, for some diff --git a/src/sage/combinat/alternating_sign_matrix.py b/src/sage/combinat/alternating_sign_matrix.py index a2f1b8a2be7..4b8475b9737 100644 --- a/src/sage/combinat/alternating_sign_matrix.py +++ b/src/sage/combinat/alternating_sign_matrix.py @@ -694,7 +694,7 @@ def ASM_compatible_bigger(self): Given an `n \times n` alternating sign matrix `A`, there are as many ASM's of size `n+1` compatible with `A` as 2 raised to the power of - the number of 1's in `A` [EKLP1992]_. + the number of 1s in `A` [EKLP1992]_. EXAMPLES:: diff --git a/src/sage/combinat/colored_permutations.py b/src/sage/combinat/colored_permutations.py index 96935d8bf80..1accb8f46ee 100644 --- a/src/sage/combinat/colored_permutations.py +++ b/src/sage/combinat/colored_permutations.py @@ -815,8 +815,8 @@ def _element_constructor_(self, x): INPUT: - Either a list of pairs ``(color, element)`` - or a pair of lists ``(colors, elements)``. + - ``x`` -- either a list of pairs ``(color, element)`` or a pair of + lists ``(colors, elements)`` TESTS:: diff --git a/src/sage/combinat/composition_tableau.py b/src/sage/combinat/composition_tableau.py index 093a77a700d..e90fe55f6a5 100644 --- a/src/sage/combinat/composition_tableau.py +++ b/src/sage/combinat/composition_tableau.py @@ -278,16 +278,12 @@ class CompositionTableaux(UniqueRepresentation, Parent): INPUT: - Keyword arguments: - - ``size`` -- the size of the composition tableaux - ``shape`` -- the shape of the composition tableaux - ``max_entry`` -- the maximum entry for the composition tableaux - Positional arguments: - - - The first argument is interpreted as ``size`` or ``shape`` depending on - whether it is an integer or a composition. + The first argument is interpreted as ``size`` or ``shape`` depending on + whether it is an integer or a composition. EXAMPLES:: diff --git a/src/sage/combinat/constellation.py b/src/sage/combinat/constellation.py index 6678c0f7e28..1ff4420888c 100644 --- a/src/sage/combinat/constellation.py +++ b/src/sage/combinat/constellation.py @@ -1631,11 +1631,9 @@ def perm_invert(p): INPUT: - a permutation of {0,..,n-1} given by a list of values + - ``p`` -- a permutation of {0,..,n-1} given by a list of values - OUTPUT: - - a permutation of {0,..,n-1} given by a list of values + OUTPUT: a permutation of {0,..,n-1} given by a list of values EXAMPLES:: @@ -1651,15 +1649,13 @@ def perm_invert(p): def perm_conjugate(p, s): """ - Return the conjugate of the permutation `p` by the permutation `s`. + Return the conjugate of the permutation `p` by the permutation `s`. INPUT: - two permutations of {0,..,n-1} given by lists of values - - OUTPUT: + - ``p``, ``s`` -- two permutations of {0,..,n-1} given by lists of values - a permutation of {0,..,n-1} given by a list of values + OUTPUT: a permutation of {0,..,n-1} given by a list of values EXAMPLES:: diff --git a/src/sage/combinat/crystals/monomial_crystals.py b/src/sage/combinat/crystals/monomial_crystals.py index 1e1e8aabe34..567f3c4aa3d 100644 --- a/src/sage/combinat/crystals/monomial_crystals.py +++ b/src/sage/combinat/crystals/monomial_crystals.py @@ -792,7 +792,7 @@ def _normalize_c(c, n): sage: C = InfinityCrystalOfNakajimaMonomials._normalize_c(c, 2) Traceback (most recent call last): ... - ValueError: the c matrix must have 0's on the diagonal + ValueError: the c matrix must have 0s on the diagonal sage: c = matrix([[0,2],[-1,0]]) sage: C = InfinityCrystalOfNakajimaMonomials._normalize_c(c, 2) Traceback (most recent call last): @@ -811,7 +811,7 @@ def _normalize_c(c, n): c = MS(c) c.set_immutable() if any(c[i,i] != 0 for i in range(n)): - raise ValueError("the c matrix must have 0's on the diagonal") + raise ValueError("the c matrix must have 0s on the diagonal") if any(c[i,j] + c[j,i] != 1 for i in range(n) for j in range(i)): raise ValueError("transpose entries do not sum to 1") if any(c[i,j] < 0 or c[j,i] < 0 for i in range(n) for j in range(i)): diff --git a/src/sage/combinat/designs/latin_squares.py b/src/sage/combinat/designs/latin_squares.py index 06668826625..34962c9f9ae 100644 --- a/src/sage/combinat/designs/latin_squares.py +++ b/src/sage/combinat/designs/latin_squares.py @@ -424,7 +424,8 @@ def latin_square_product(M, N, *others): INPUT: - An arbitrary number of latin squares (greater than 2). + - ``M``, ``N``, ``*others`` -- an arbitrary number of latin squares + (greater than or equal to 2) EXAMPLES:: diff --git a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py index b863124d7fc..5d71fbb12c8 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py +++ b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py @@ -1021,7 +1021,7 @@ def product_with_parallel_classes(OA1,k,g1,g2,g1_parall,parall,check=True): INPUT: - - ``OA1`` (an `OA(k,g_1)` + - ``OA1`` -- (an `OA(k,g_1)` - ``k``, ``g1``, ``g2`` -- integers diff --git a/src/sage/combinat/dyck_word.py b/src/sage/combinat/dyck_word.py index 584b4e42c56..f6c8c2fe2d0 100644 --- a/src/sage/combinat/dyck_word.py +++ b/src/sage/combinat/dyck_word.py @@ -4120,7 +4120,7 @@ def random_element(self) -> DyckWord: Return a random complete Dyck word of semilength `n`. The algorithm is based on a classical combinatorial fact. One - chooses at random a word with `n` 0's and `n+1` 1's. One then + chooses at random a word with `n` 0s and `n+1` 1s. One then considers every 1 as an ascending step and every 0 as a descending step, and one finds the lowest point of the path (with respect to a slightly tilted slope). One then cuts the diff --git a/src/sage/combinat/enumeration_mod_permgroup.pyx b/src/sage/combinat/enumeration_mod_permgroup.pyx index a188951784e..f74ebeb07f8 100644 --- a/src/sage/combinat/enumeration_mod_permgroup.pyx +++ b/src/sage/combinat/enumeration_mod_permgroup.pyx @@ -92,7 +92,8 @@ cpdef int lex_cmp(ClonableIntArray v1, ClonableIntArray v2) noexcept: INPUT: - Two instances `v_1, v_2` of :class:`~sage.structure.list_clone.ClonableIntArray` + - ``v1``, ``v2`` -- two instances of + :class:`~sage.structure.list_clone.ClonableIntArray` OUTPUT: diff --git a/src/sage/combinat/finite_state_machine.py b/src/sage/combinat/finite_state_machine.py index d417035979b..b3f503fbdbb 100644 --- a/src/sage/combinat/finite_state_machine.py +++ b/src/sage/combinat/finite_state_machine.py @@ -1630,12 +1630,6 @@ def label(self): """ Return the label of the state. - INPUT: - - Nothing. - - OUTPUT: the label of the state - EXAMPLES:: sage: from sage.combinat.finite_state_machine import FSMState @@ -1649,10 +1643,6 @@ def __copy__(self): """ Return a (shallow) copy of the state. - INPUT: - - Nothing. - OUTPUT: a new state EXAMPLES:: @@ -1791,10 +1781,6 @@ def __getstate__(self): """ Return state for pickling excluding outgoing transitions. - INPUT: - - None - OUTPUT: a dictionary Outgoing transitions are in fact stored in states, @@ -1851,10 +1837,6 @@ def _repr_(self): """ Return the string "label". - INPUT: - - Nothing. - OUTPUT: string TESTS:: @@ -2328,10 +2310,6 @@ def _repr_(self): """ Represent a transitions as from state to state and input, output. - INPUT: - - Nothing. - OUTPUT: string EXAMPLES:: @@ -3474,10 +3452,6 @@ def __hash__(self): Since finite state machines are mutable, they should not be hashable, so we return a type error. - INPUT: - - Nothing. - OUTPUT: the hash of this finite state machine EXAMPLES:: @@ -4096,10 +4070,6 @@ def _repr_(self): Represent the finite state machine as "Finite state machine with n states" where n is the number of states. - INPUT: - - Nothing. - OUTPUT: string EXAMPLES:: @@ -6859,10 +6829,6 @@ def accessible_components(self): Return a new finite state machine with the accessible states of ``self`` and all transitions between those states. - INPUT: - - Nothing. - OUTPUT: A finite state machine with the accessible states of ``self`` and @@ -8609,10 +8575,6 @@ def prepone_output(self): transition to the earliest possible preceding transition of the path. - INPUT: - - Nothing. - OUTPUT: nothing Apply the following to each state `s` (except initial states) of the @@ -8986,10 +8948,6 @@ def merged_transitions(self): Merges transitions which have the same ``from_state``, ``to_state`` and ``word_out`` while adding their ``word_in``. - INPUT: - - Nothing. - OUTPUT: A finite state machine with merged transitions. If no mergers occur, @@ -9057,10 +9015,6 @@ def markov_chain_simplification(self): Consider ``self`` as Markov chain with probabilities as input labels and simplify it. - INPUT: - - Nothing. - OUTPUT: simplified version of ``self`` EXAMPLES:: @@ -9498,10 +9452,6 @@ def plot(self): Plots a graph of the finite state machine with labeled vertices and labeled edges. - INPUT: - - Nothing. - OUTPUT: a plot of the graph of the finite state machine TESTS:: @@ -10782,10 +10732,6 @@ def _repr_(self): Represent the finite state machine as "Automaton with n states" where n is the number of states. - INPUT: - - Nothing. - OUTPUT: string EXAMPLES:: @@ -11958,10 +11904,6 @@ def _repr_(self): Represent the transducer as "Transducer with n states" where n is the number of states. - INPUT: - - Nothing. - OUTPUT: string EXAMPLES:: @@ -14175,10 +14117,6 @@ def __next__(self): """ Makes one step in processing the input tape. - INPUT: - - Nothing. - OUTPUT: It returns the current status of the iterator (see below). A diff --git a/src/sage/combinat/finite_state_machine_generators.py b/src/sage/combinat/finite_state_machine_generators.py index 947f9d27d44..0f975a81d7b 100644 --- a/src/sage/combinat/finite_state_machine_generators.py +++ b/src/sage/combinat/finite_state_machine_generators.py @@ -981,10 +981,6 @@ def GrayCode(self): Return a transducer converting the standard binary expansion to Gray code. - INPUT: - - Nothing. - OUTPUT: a transducer Cf. the :wikipedia:`Gray_code` for a description of the Gray code. diff --git a/src/sage/combinat/hall_polynomial.py b/src/sage/combinat/hall_polynomial.py index 9d2326e60f8..96e23908d37 100644 --- a/src/sage/combinat/hall_polynomial.py +++ b/src/sage/combinat/hall_polynomial.py @@ -171,7 +171,7 @@ def hall_polynomial(nu, mu, la, q=None): for k in range(n): r.append(r[-1] + sum(exp_mu[k:]) - sum(exp_nu[k:])) # Now, r is [r_0, r_1, ..., r_n]. - exp_nu += [0]*(n - len(exp_nu)) # Pad with 0's until it has length n + exp_nu += [0]*(n - len(exp_nu)) # Pad with 0s until it has length n # Note that all -1 for exp_nu is due to indexing t = sum((r[k-2] - r[k-1])*(sum(exp_nu[k-1:]) - r[k-1]) for k in range(2,n+1)) if t < 0: diff --git a/src/sage/combinat/interval_posets.py b/src/sage/combinat/interval_posets.py index 9daeef48ce8..24084d03b82 100644 --- a/src/sage/combinat/interval_posets.py +++ b/src/sage/combinat/interval_posets.py @@ -3407,8 +3407,8 @@ def from_minimal_schnyder_wood(graph) -> TIP: INPUT: - a minimal Schnyder wood, given as a graph with colored and - oriented edges, without the three exterior unoriented edges + - ``graph`` -- a minimal Schnyder wood, given as a graph with colored + and oriented edges, without the three exterior unoriented edges The three boundary vertices must be -1, -2 and -3. diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 94777faa927..c08812c5a83 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -710,8 +710,7 @@ def construction_four_symbol_delta_code_I(X, Y, Z, W): - ``Z`` -- list; the third sequence (length `n`) - ``W`` -- list; the fourth sequence (length `n`) - OUTPUT: - A tuple containing the 4-symbol `\delta` code of length `2n+1`. + OUTPUT: tuple containing the 4-symbol `\delta` code of length `2n+1` EXAMPLES:: @@ -780,8 +779,7 @@ def construction_four_symbol_delta_code_II(X, Y, Z, W): - ``Z`` -- list; the third sequence (length `n`) - ``W`` -- list; the fourth sequence (length `n`) - OUTPUT: - A tuple containing the four 4-symbol `\delta` code of length `4n+3`. + OUTPUT: tuple containing the four 4-symbol `\delta` code of length `4n+3` EXAMPLES:: diff --git a/src/sage/combinat/necklace.py b/src/sage/combinat/necklace.py index 45fb2921d27..3ac4bccf5e2 100644 --- a/src/sage/combinat/necklace.py +++ b/src/sage/combinat/necklace.py @@ -461,7 +461,7 @@ def _sfc(content, equality=False): .. WARNING:: - You will get incorrect results if there are leading 0's in ``content``. + You will get incorrect results if there are leading 0s in ``content``. See :issue:`12997` and :issue:`17436`. EXAMPLES:: diff --git a/src/sage/combinat/partition.py b/src/sage/combinat/partition.py index 76eec50217a..b2afef69287 100644 --- a/src/sage/combinat/partition.py +++ b/src/sage/combinat/partition.py @@ -1707,7 +1707,7 @@ def next_within_bounds(self, min=[], max=None, partition_type=None): # if there is no max, the next partition just tacks a '1' on to the end! if max is None: return _Partitions(p + [1]) - # extend p and min to include 0's at the end + # extend p and min to include 0s at the end p = p + [0] * (len(max) - len(p)) min = min + [0] * (len(max) - len(min)) # finally, run the algo to find next_p @@ -4359,8 +4359,8 @@ def zero_one_sequence(self): that in English convention, a 1 corresponds to an East step, and a 0 corresponds to a North step. - Note that every full `0-1` sequence starts with infinitely many 0's and - ends with infinitely many 1's. + Note that every full `0-1` sequence starts with infinitely many 0s and + ends with infinitely many 1s. One place where these arise is in the affine symmetric group where one takes an affine permutation `w` and every `i` such that @@ -4375,7 +4375,7 @@ def zero_one_sequence(self): OUTPUT: The finite `0-1` sequence is obtained from the full `0-1` - sequence by omitting all heading 0's and trailing 1's. The + sequence by omitting all heading 0s and trailing 1s. The output sequence is finite, starts with a 1 and ends with a 0 (unless it is empty, for the empty partition). Its length is the sum of the first part of the partition with the @@ -6636,8 +6636,8 @@ def from_zero_one(self, seq): that in English convention, a 1 corresponds to an East step, and a 0 corresponds to a North step. - Note that every full `0-1` sequence starts with infinitely many 0's and - ends with infinitely many 1's. + Note that every full `0-1` sequence starts with infinitely many 0s and + ends with infinitely many 1s. .. SEEALSO:: @@ -6645,8 +6645,8 @@ def from_zero_one(self, seq): INPUT: - The input should be a finite sequence of 0's and 1's. The - heading 0's and trailing 1's will be discarded. + The input should be a finite sequence of 0s and 1s. The + heading 0s and trailing 1s will be discarded. EXAMPLES:: @@ -6657,7 +6657,7 @@ def from_zero_one(self, seq): sage: Partitions().from_zero_one([1, 1, 1, 1, 0, 1, 0]) [5, 4] - Heading 0's and trailing 1's are correctly handled:: + Heading 0s and trailing 1s are correctly handled:: sage: Partitions().from_zero_one([0,0,1,1,1,1,0,1,0,1,1,1]) [5, 4] diff --git a/src/sage/combinat/partition_tuple.py b/src/sage/combinat/partition_tuple.py index 1f181459919..24aa985fd74 100644 --- a/src/sage/combinat/partition_tuple.py +++ b/src/sage/combinat/partition_tuple.py @@ -341,9 +341,9 @@ class of modules for the algebras which are generalisations of the Specht INPUT: - Anything which can reasonably be interpreted as a tuple of partitions. - That is, a list or tuple of partitions or valid input to - :class:`Partition`. + Anything which can reasonably be interpreted as a tuple of partitions. + That is, a list or tuple of partitions or valid input to + :class:`Partition`. EXAMPLES:: diff --git a/src/sage/combinat/posets/hasse_cython_flint.pyx b/src/sage/combinat/posets/hasse_cython_flint.pyx index b1a6dfb43b2..e2b4589b238 100644 --- a/src/sage/combinat/posets/hasse_cython_flint.pyx +++ b/src/sage/combinat/posets/hasse_cython_flint.pyx @@ -28,8 +28,8 @@ cpdef Matrix_integer_dense moebius_matrix_fast(list positions): INPUT: - a list of sets of integers describing the poset, as given by the - lazy attribute ``_leq_storage`` of Hasse diagrams. + - ``positions`` -- a list of sets of integers describing the poset, as + given by the lazy attribute ``_leq_storage`` of Hasse diagrams OUTPUT: a dense matrix @@ -85,8 +85,8 @@ cpdef Matrix_integer_dense coxeter_matrix_fast(list positions): INPUT: - a list of sets of integers describing the poset, as given by the - lazy attribute ``_leq_storage`` of Hasse diagrams. + - ``positions`` -- a list of sets of integers describing the poset, as + given by the lazy attribute ``_leq_storage`` of Hasse diagrams OUTPUT: a dense matrix diff --git a/src/sage/combinat/root_system/reflection_group_real.py b/src/sage/combinat/root_system/reflection_group_real.py index 99e52d5e7e1..9ad56e53423 100644 --- a/src/sage/combinat/root_system/reflection_group_real.py +++ b/src/sage/combinat/root_system/reflection_group_real.py @@ -53,7 +53,7 @@ from sage.combinat.root_system.reflection_group_element import RealReflectionGroupElement -def ReflectionGroup(*args,**kwds): +def ReflectionGroup(*args, **kwds): r""" Construct a finite (complex or real) reflection group as a Sage permutation group by fetching the permutation representation of the @@ -61,7 +61,7 @@ def ReflectionGroup(*args,**kwds): INPUT: - can be one or multiple of the following: + Can be one or multiple of the following: - a triple `(r, p, n)` with `p` divides `r`, which denotes the group `G(r, p, n)` diff --git a/src/sage/combinat/sloane_functions.py b/src/sage/combinat/sloane_functions.py index dc5364d232f..cb506cb7bac 100644 --- a/src/sage/combinat/sloane_functions.py +++ b/src/sage/combinat/sloane_functions.py @@ -1838,7 +1838,7 @@ def _eval(self, n): class A000012(SloaneSequence): def __init__(self): r""" - The all 1's sequence. + The all 1s sequence. INPUT: @@ -1849,7 +1849,7 @@ def __init__(self): EXAMPLES:: sage: a = sloane.A000012; a - The all 1's sequence. + The all 1s sequence. sage: a(1) 1 sage: a(2007) @@ -1868,9 +1868,9 @@ def _repr_(self): EXAMPLES:: sage: sloane.A000012._repr_() - "The all 1's sequence." + "The all 1s sequence." """ - return "The all 1's sequence." + return "The all 1s sequence." def _eval(self, n): """ @@ -1885,7 +1885,7 @@ def _eval(self, n): class A000120(SloaneSequence): def __init__(self): r""" - 1's-counting sequence: number of 1's in binary expansion of `n`. + 1s-counting sequence: number of 1s in binary expansion of `n`. INPUT: @@ -1896,7 +1896,7 @@ def __init__(self): EXAMPLES:: sage: a = sloane.A000120;a - 1's-counting sequence: number of 1's in binary expansion of n. + 1s-counting sequence: number of 1s in binary expansion of n. sage: a(0) 0 sage: a(2) @@ -1917,9 +1917,9 @@ def _repr_(self): EXAMPLES:: sage: sloane.A000120._repr_() - "1's-counting sequence: number of 1's in binary expansion of n." + "1s-counting sequence: number of 1s in binary expansion of n." """ - return "1's-counting sequence: number of 1's in binary expansion of n." + return "1s-counting sequence: number of 1s in binary expansion of n." def f(self, n): """ @@ -1950,7 +1950,7 @@ def __init__(self): Let `A_k` denote the first `2^k` terms; then `A_0 = 0`, and for `k \ge 0`, `A_{k+1} = A_k B_k`, where `B_k` is obtained - from `A_k` by interchanging 0's and 1's. + from `A_k` by interchanging 0s and 1s. INPUT: @@ -2001,7 +2001,7 @@ def _eval(self, n): class A000069(SloaneSequence): def __init__(self): r""" - Odious numbers: odd number of 1's in binary expansion. + Odious numbers: odd number of 1s in binary expansion. INPUT: @@ -2012,7 +2012,7 @@ def __init__(self): EXAMPLES:: sage: a = sloane.A000069; a - Odious numbers: odd number of 1's in binary expansion. + Odious numbers: odd number of 1s in binary expansion. sage: a(0) 1 sage: a(2) @@ -2031,9 +2031,9 @@ def _repr_(self): EXAMPLES:: sage: sloane.A000069._repr_() - "Odious numbers: odd number of 1's in binary expansion." + "Odious numbers: odd number of 1s in binary expansion." """ - return "Odious numbers: odd number of 1's in binary expansion." + return "Odious numbers: odd number of 1s in binary expansion." def _eval(self, n): """ @@ -2048,7 +2048,7 @@ def _eval(self, n): class A001969(SloaneSequence): def __init__(self): r""" - Evil numbers: even number of 1's in binary expansion. + Evil numbers: even number of 1s in binary expansion. INPUT: @@ -2059,7 +2059,7 @@ def __init__(self): EXAMPLES:: sage: a = sloane.A001969;a - Evil numbers: even number of 1's in binary expansion. + Evil numbers: even number of 1s in binary expansion. sage: a(0) 0 sage: a(1) @@ -2082,9 +2082,9 @@ def _repr_(self): EXAMPLES:: sage: sloane.A001969._repr_() - "Evil numbers: even number of 1's in binary expansion." + "Evil numbers: even number of 1s in binary expansion." """ - return "Evil numbers: even number of 1's in binary expansion." + return "Evil numbers: even number of 1s in binary expansion." def _eval(self, n): """ @@ -5759,7 +5759,7 @@ def __init__(self): permutations of `n` elements with no fixed points. With offset 1 also the permanent of a (0,1)-matrix of order - `n` with `n` 0's not on a line. + `n` with `n` 0s not on a line. INPUT: diff --git a/src/sage/combinat/subset.py b/src/sage/combinat/subset.py index 45e13a6d614..5fea2f5f97b 100644 --- a/src/sage/combinat/subset.py +++ b/src/sage/combinat/subset.py @@ -892,7 +892,7 @@ def list_to_dict(l): INPUT: - a list ``l`` with possibly repeated elements + - ``l`` -- list with possibly repeated elements The keys are the elements of ``l`` (in the same order in which they appear) and values are the multiplicities of each element in ``l``. diff --git a/src/sage/combinat/subword_complex.py b/src/sage/combinat/subword_complex.py index 5c2c1469d5d..59b136cf89b 100644 --- a/src/sage/combinat/subword_complex.py +++ b/src/sage/combinat/subword_complex.py @@ -1713,7 +1713,7 @@ def minkowski_summand(self, i): INPUT: - `i` -- an integer defining a position in the word `Q` + - ``i`` -- an integer defining a position in the word `Q` EXAMPLES:: diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index 0a6cfeee313..4fd101907e4 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -1257,7 +1257,7 @@ def to_sign_matrix(self, max_entry=None): r""" Return the sign matrix of ``self``. - A sign matrix is an `m \times n` matrix of 0's, 1's and -1's such that the + A sign matrix is an `m \times n` matrix of 0s, 1s, and -1s such that the partial sums of each column is either 0 or 1 and the partial sums of each row is nonnegative. [Ava2007]_ diff --git a/src/sage/combinat/words/morphism.py b/src/sage/combinat/words/morphism.py index f863801167a..6dccf6c92f7 100644 --- a/src/sage/combinat/words/morphism.py +++ b/src/sage/combinat/words/morphism.py @@ -2592,8 +2592,8 @@ def rauzy_fractal_points(self, n=None, exchange=False, eig=None, translate=None, INPUT: - See the method :meth:`rauzy_fractal_plot` for a description - of the options and more examples. + See the method :meth:`rauzy_fractal_plot` for a description + of the options and more examples. OUTPUT: dictionary of list of points diff --git a/src/sage/combinat/words/word_generators.py b/src/sage/combinat/words/word_generators.py index 4c2931bcbd4..5803709ba5b 100644 --- a/src/sage/combinat/words/word_generators.py +++ b/src/sage/combinat/words/word_generators.py @@ -1997,7 +1997,7 @@ def BaumSweetWord(self): .. MATH:: b_n = \begin{cases} - 1, & \text{if the binary representation of} n \text{ contains no block of consecutive 0's of odd length}\\ + 1, & \text{if the binary representation of} n \text{ contains no block of consecutive 0s of odd length}\\ 0, & \text{otherwise}\\ \end{cases}\\ diff --git a/src/sage/crypto/mq/mpolynomialsystemgenerator.py b/src/sage/crypto/mq/mpolynomialsystemgenerator.py index 7735d480a5f..864e9ab1ea1 100644 --- a/src/sage/crypto/mq/mpolynomialsystemgenerator.py +++ b/src/sage/crypto/mq/mpolynomialsystemgenerator.py @@ -40,7 +40,8 @@ def varformatstr(self, name): encoded. INPUT: - name -- string + + - ``name`` -- string EXAMPLES:: @@ -61,8 +62,9 @@ def varstrs(self, name, round): This function is typically used by self._vars. INPUT: - name -- string - round -- integer index + + - ``name`` -- string + - ``round`` -- integer index EXAMPLES:: @@ -81,8 +83,9 @@ def vars(self, name, round): index 'round'. INPUT: - name -- string - round -- integer index + + - ``name`` -- string + - ``round`` -- integer index EXAMPLES:: @@ -131,8 +134,9 @@ def __call__(self, P, K): Encrypt plaintext P using the key K. INPUT: - P -- plaintext (vector, list) - K -- key (vector, list) + + - ``P`` -- plaintext (vector, list) + - ``K`` -- key (vector, list) EXAMPLES:: @@ -167,8 +171,9 @@ def polynomial_system(self, P=None, K=None): to their solutions. INPUT: - P -- plaintext (vector, list) - K -- key (vector, list) + + - ``P`` -- plaintext (vector, list) + - ``K`` -- key (vector, list) EXAMPLES:: diff --git a/src/sage/data_structures/mutable_poset.py b/src/sage/data_structures/mutable_poset.py index a35e25e2923..ecb23f34548 100644 --- a/src/sage/data_structures/mutable_poset.py +++ b/src/sage/data_structures/mutable_poset.py @@ -430,10 +430,6 @@ def _repr_(self): r""" Return the representation of this shell. - INPUT: - - Nothing. - OUTPUT: string .. NOTE:: @@ -467,10 +463,6 @@ def __hash__(self): r""" Return the hash of this shell. - INPUT: - - Nothing. - OUTPUT: a hash value This returns the hash value of the key of the element @@ -1395,10 +1387,6 @@ def clear(self): r""" Remove all elements from this poset. - INPUT: - - Nothing. - OUTPUT: nothing .. SEEALSO:: @@ -1433,10 +1421,6 @@ def __len__(self): r""" Return the number of elements contained in this poset. - INPUT: - - Nothing. - OUTPUT: integer .. NOTE:: @@ -3175,10 +3159,6 @@ def maximal_elements(self): r""" Return an iterator over the maximal elements of this poset. - INPUT: - - Nothing. - OUTPUT: an iterator EXAMPLES:: @@ -3204,10 +3184,6 @@ def minimal_elements(self): r""" Return an iterator over the minimal elements of this poset. - INPUT: - - Nothing. - OUTPUT: an iterator EXAMPLES:: diff --git a/src/sage/databases/findstat.py b/src/sage/databases/findstat.py index aaba11c858c..6a3973d8186 100644 --- a/src/sage/databases/findstat.py +++ b/src/sage/databases/findstat.py @@ -4715,7 +4715,7 @@ def _element_constructor_(self, entry): INPUT: - see :class:`FindStatCollection`. + See :class:`FindStatCollection`. TESTS: diff --git a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py index d755d3c593b..a72706a4ac1 100644 --- a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py @@ -2864,15 +2864,15 @@ def possible_periods(self, **kwds): INPUT: - kwds: + - ``**kwds`` -- keywords: - - ``prime_bound`` -- (default: ``[1, 20]``) a list or tuple of - two positive integers or an integer for the upper bound + - ``prime_bound`` -- (default: ``[1, 20]``) a list or tuple of + two positive integers or an integer for the upper bound - - ``bad_primes`` -- (optional) a list or tuple of integer primes, - the primes of bad reduction + - ``bad_primes`` -- (optional) a list or tuple of integer primes, + the primes of bad reduction - - ``ncpus`` -- (default: all cpus) number of cpus to use in parallel + - ``ncpus`` -- (default: all cpus) number of cpus to use in parallel OUTPUT: list of positive integers @@ -4219,21 +4219,22 @@ def critical_height(self, **kwds): INPUT: - kwds: + - ``**kwds`` -- keywords: - - ``badprimes`` -- (optional) a list of primes of bad reduction + - ``badprimes`` -- (optional) a list of primes of bad reduction - - ``N`` -- (default: 10) positive integer; number of terms of - the series to use in the local green functions + - ``N`` -- (default: 10) positive integer; number of terms of + the series to use in the local green functions - - ``prec`` -- (default: 100) positive integer, float point - or `p`-adic precision + - ``prec`` -- (default: 100) positive integer, float point + or `p`-adic precision - - ``error_bound`` -- (optional) a positive real number + - ``error_bound`` -- (optional) a positive real number - - ``use_algebraic_closure`` -- boolean (default: ``True``); if ``True``, uses the - algebraic closure. If ``False``, uses the smallest extension of the base field - containing all the critical points. + - ``use_algebraic_closure`` -- boolean (default: ``True``); if + ``True``, uses the algebraic closure. If ``False``, uses the + smallest extension of the base field containing all the critical + points. OUTPUT: real number @@ -6002,37 +6003,37 @@ def reduced_form(self, **kwds): INPUT: - keywords: + - ``**kwds`` -- keywords: - - ``prec`` -- (default: 300) integer, desired precision + - ``prec`` -- (default: 300) integer, desired precision - - ``return_conjuagtion`` -- boolean (default: ``True``); return - an element of `SL(2, \ZZ)` + - ``return_conjuagtion`` -- boolean (default: ``True``); return + an element of `SL(2, \ZZ)` - - ``error_limit`` -- (default: 0.000001) a real number, sets - the error tolerance + - ``error_limit`` -- (default: 0.000001) a real number, sets + the error tolerance - - ``smallest_coeffs`` -- boolean (default: ``True``); whether to find the - model with smallest coefficients + - ``smallest_coeffs`` -- boolean (default: ``True``); whether to find the + model with smallest coefficients - - ``dynatomic`` -- boolean (default: ``True``); to use formal periodic points + - ``dynatomic`` -- boolean (default: ``True``); to use formal periodic points - - ``start_n`` -- positive integer (default: 1); first period to try to find - appropriate binary form + - ``start_n`` -- positive integer (default: 1); first period to try to find + appropriate binary form - - ``emb`` -- (optional) embedding of based field into CC + - ``emb`` -- (optional) embedding of based field into CC - - ``algorithm`` -- (optional) which algorithm to use to find all - minimal models. Can be one of the following: + - ``algorithm`` -- (optional) which algorithm to use to find all + minimal models. Can be one of the following: - * ``'BM'`` -- Bruin-Molnar algorithm [BM2012]_ - * ``'HS'`` -- Hutz-Stoll algorithm [HS2018]_ + * ``'BM'`` -- Bruin-Molnar algorithm [BM2012]_ + * ``'HS'`` -- Hutz-Stoll algorithm [HS2018]_ - - ``check_minimal`` -- (default: ``True``), boolean, whether to check - if this map is a minimal model + - ``check_minimal`` -- (default: ``True``), boolean, whether to check + if this map is a minimal model - - ``smallest_coeffs`` -- (default: ``True``), boolean, whether to find the - model with smallest coefficients + - ``smallest_coeffs`` -- (default: ``True``), boolean, whether to find the + model with smallest coefficients OUTPUT: @@ -7074,32 +7075,32 @@ def all_periodic_points(self, **kwds): INPUT: - kwds: + - ``**kwds`` -- keywords: - - ``R`` -- (default: domain of dynamical system) the base ring - over which the periodic points of the dynamical system are found + - ``R`` -- (default: domain of dynamical system) the base ring + over which the periodic points of the dynamical system are found - - ``prime_bound`` -- (default: ``[1,20]``) a pair (list or tuple) - of positive integers that represent the limits of primes to use - in the reduction step or an integer that represents the upper bound + - ``prime_bound`` -- (default: ``[1,20]``) a pair (list or tuple) + of positive integers that represent the limits of primes to use + in the reduction step or an integer that represents the upper bound - - ``lifting_prime`` -- (default: 23) a prime integer; argument that - specifies modulo which prime to try and perform the lifting + - ``lifting_prime`` -- (default: 23) a prime integer; argument that + specifies modulo which prime to try and perform the lifting - - ``period_degree_bounds`` -- (default: ``[4,4]``) a pair of positive integers - (max period, max degree) for which the dynatomic polynomial should be solved for + - ``period_degree_bounds`` -- (default: ``[4,4]``) a pair of positive integers + (max period, max degree) for which the dynatomic polynomial should be solved for - - ``algorithm`` -- (optional) specifies which algorithm to use; - current options are `dynatomic` and `lifting`; defaults to solving the - dynatomic for low periods and degrees and lifts for everything else + - ``algorithm`` -- (optional) specifies which algorithm to use; + current options are `dynatomic` and `lifting`; defaults to solving the + dynatomic for low periods and degrees and lifts for everything else - - ``periods`` -- (optional) a list of positive integers that is - the list of possible periods + - ``periods`` -- (optional) a list of positive integers that is + the list of possible periods - - ``bad_primes`` -- (optional) a list or tuple of integer primes; - the primes of bad reduction + - ``bad_primes`` -- (optional) a list or tuple of integer primes; + the primes of bad reduction - - ``ncpus`` -- (default: all cpus) number of cpus to use in parallel + - ``ncpus`` -- (default: all cpus) number of cpus to use in parallel OUTPUT: list of rational points in projective space @@ -7435,33 +7436,33 @@ def all_preperiodic_points(self, **kwds): INPUT: - kwds: + - ``**kwds`` -- keywords: - - ``R`` -- (default: domain of dynamical system) the base ring - over which the periodic points of the dynamical system are found + - ``R`` -- (default: domain of dynamical system) the base ring + over which the periodic points of the dynamical system are found - - ``prime_bound`` -- (default: ``[1, 20]``) a pair (list or tuple) - of positive integers that represent the limits of primes to use - in the reduction step or an integer that represents the upper bound + - ``prime_bound`` -- (default: ``[1, 20]``) a pair (list or tuple) + of positive integers that represent the limits of primes to use + in the reduction step or an integer that represents the upper bound - - ``lifting_prime`` -- (default: 23) a prime integer; specifies - modulo which prime to try and perform the lifting + - ``lifting_prime`` -- (default: 23) a prime integer; specifies + modulo which prime to try and perform the lifting - - ``periods`` -- (optional) a list of positive integers that is - the list of possible periods + - ``periods`` -- (optional) a list of positive integers that is + the list of possible periods - - ``bad_primes`` -- (optional) a list or tuple of integer primes; - the primes of bad reduction + - ``bad_primes`` -- (optional) a list or tuple of integer primes; + the primes of bad reduction - - ``ncpus`` -- (default: all cpus) number of cpus to use in parallel + - ``ncpus`` -- (default: all cpus) number of cpus to use in parallel - - ``period_degree_bounds`` -- (default: ``[4,4]``) a pair of positive integers - (max period, max degree) for which the dynatomic polynomial should be solved - for when in dimension 1 + - ``period_degree_bounds`` -- (default: ``[4,4]``) a pair of positive integers + (max period, max degree) for which the dynatomic polynomial should be solved + for when in dimension 1 - - ``algorithm`` -- (optional) specifies which algorithm to use; - current options are `dynatomic` and `lifting`; defaults to solving the - dynatomic for low periods and degrees and lifts for everything else + - ``algorithm`` -- (optional) specifies which algorithm to use; + current options are `dynatomic` and `lifting`; defaults to solving the + dynatomic for low periods and degrees and lifts for everything else OUTPUT: list of rational points in projective space @@ -7605,22 +7606,22 @@ def rational_preperiodic_graph(self, **kwds): INPUT: - kwds: + - ``**kwds`` -- keywords: - - ``prime_bound`` -- (default: ``[1, 20]``) a pair (list or tuple) - of positive integers that represent the limits of primes to use - in the reduction step or an integer that represents the upper bound + - ``prime_bound`` -- (default: ``[1, 20]``) a pair (list or tuple) + of positive integers that represent the limits of primes to use + in the reduction step or an integer that represents the upper bound - - ``lifting_prime`` -- (default: 23) a prime integer; specifies - modulo which prime to try and perform the lifting + - ``lifting_prime`` -- (default: 23) a prime integer; specifies + modulo which prime to try and perform the lifting - - ``periods`` -- (optional) a list of positive integers that is - the list of possible periods + - ``periods`` -- (optional) a list of positive integers that is + the list of possible periods - - ``bad_primes`` -- (optional) a list or tuple of integer primes; - the primes of bad reduction + - ``bad_primes`` -- (optional) a list or tuple of integer primes; + the primes of bad reduction - - ``ncpus`` -- (default: all cpus) number of cpus to use in parallel + - ``ncpus`` -- (default: all cpus) number of cpus to use in parallel OUTPUT: @@ -9303,10 +9304,10 @@ def all_periodic_points(self, **kwds): INPUT: - keywords: + - ``**kwds`` -- keywords: - - ``R`` -- (default: base ring of dynamical system) the base ring - over which the periodic points of the dynamical system are found + - ``R`` -- (default: base ring of dynamical system) the base ring + over which the periodic points of the dynamical system are found OUTPUT: list of elements which are periodic diff --git a/src/sage/geometry/fan.py b/src/sage/geometry/fan.py index a908421431a..22125763ead 100644 --- a/src/sage/geometry/fan.py +++ b/src/sage/geometry/fan.py @@ -3383,7 +3383,7 @@ def toric_variety(self, *args, **kwds): INPUT: - same arguments as :func:`~sage.schemes.toric.variety.ToricVariety` + Same arguments as :func:`~sage.schemes.toric.variety.ToricVariety`. OUTPUT: a toric variety diff --git a/src/sage/geometry/hyperplane_arrangement/arrangement.py b/src/sage/geometry/hyperplane_arrangement/arrangement.py index aa0f87c94f9..1d0038ecb96 100644 --- a/src/sage/geometry/hyperplane_arrangement/arrangement.py +++ b/src/sage/geometry/hyperplane_arrangement/arrangement.py @@ -1723,7 +1723,7 @@ def echelon_col_iter(row_iter): v[pivot] = 1 complement_basis.append(vector(R, v)) # reduce the hyperplane equations - echelon_pivots = [] # the column indices where N has 1's from the echelonization + echelon_pivots = [] # the column indices where N has 1s from the echelonization for pivot, row in echelon_col_iter(complement_basis): assert row[pivot] == 1 echelon_pivots.append(pivot) diff --git a/src/sage/geometry/polyhedron/base5.py b/src/sage/geometry/polyhedron/base5.py index e330dfa53f3..d683955b53a 100644 --- a/src/sage/geometry/polyhedron/base5.py +++ b/src/sage/geometry/polyhedron/base5.py @@ -2407,7 +2407,8 @@ def lawrence_extension(self, v): if `v` is a vertex. INPUT: - - ``v`` -- a vertex of ``self`` or a point outside it + + - ``v`` -- a vertex of ``self`` or a point outside it EXAMPLES:: diff --git a/src/sage/geometry/polyhedron/base6.py b/src/sage/geometry/polyhedron/base6.py index a88e99ccc04..5f035fb061d 100644 --- a/src/sage/geometry/polyhedron/base6.py +++ b/src/sage/geometry/polyhedron/base6.py @@ -1093,7 +1093,7 @@ def affine_hull_projection(self, INPUT: - - ``as_polyhedron`` (or ``as_convex_set``) -- boolean or the default + - ``as_polyhedron`` -- (or ``as_convex_set``) boolean or the default ``None`` - ``as_affine_map`` -- boolean (default: ``False``); control the output diff --git a/src/sage/graphs/base/dense_graph.pyx b/src/sage/graphs/base/dense_graph.pyx index 65e12f6636f..45d09ced3d3 100644 --- a/src/sage/graphs/base/dense_graph.pyx +++ b/src/sage/graphs/base/dense_graph.pyx @@ -319,8 +319,9 @@ cdef class DenseGraph(CGraph): - ``l`` -- positive integer label, or zero for no label, or ``-1`` for any label OUTPUT: - 0 -- False - 1 -- True + + - 0 -- False + - 1 -- True """ if unlikely(l > 0): raise ValueError("cannot locate labeled arc in unlabeled graph") diff --git a/src/sage/graphs/base/graph_backends.pyx b/src/sage/graphs/base/graph_backends.pyx index dc4044407c9..50c1f318c53 100644 --- a/src/sage/graphs/base/graph_backends.pyx +++ b/src/sage/graphs/base/graph_backends.pyx @@ -328,8 +328,7 @@ cdef class GenericGraphBackend(SageObject): - ``v`` -- vertex label - OUTPUT: - boolean + OUTPUT: boolean TESTS:: @@ -382,9 +381,8 @@ cdef class GenericGraphBackend(SageObject): - ``vertices`` -- list of vertex labels - ``labels`` -- boolean - OUTPUT: - a generator which yields edges, with or without labels - depending on the labels parameter. + OUTPUT: a generator which yields edges, with or without labels + depending on the labels parameter TESTS:: diff --git a/src/sage/graphs/base/sparse_graph.pyx b/src/sage/graphs/base/sparse_graph.pyx index a7595b52d28..2c31e38f209 100644 --- a/src/sage/graphs/base/sparse_graph.pyx +++ b/src/sage/graphs/base/sparse_graph.pyx @@ -587,8 +587,9 @@ cdef class SparseGraph(CGraph): - ``u``, ``v`` -- nonnegative integers OUTPUT: - 0 -- No error. - 1 -- No arc to delete. + + - 0 -- no error + - 1 -- no arc to delete """ cdef int n_arcs = self._del_arc_unsafe(u, v, self.vertices) if u != v or self.is_directed(): @@ -1027,8 +1028,9 @@ cdef class SparseGraph(CGraph): Delete an arc (u, v) with label l. OUTPUT: - 0 -- No error. - 1 -- No arc with label l. + + - 0 -- no error + - 1 -- no arc with label l """ cdef int i = (u * self.hash_length) + (v & self.hash_mask) cdef SparseGraphBTNode **old_parent = parent diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index 234de73676f..f8314b9c830 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -1783,7 +1783,7 @@ def load_afile(self, fname): # read adjacency information for cidx in range(num_cols): for ridx in map(int, fi.readline().split()): - # A-list uses 1-based indices with 0's as place-holders + # A-list uses 1-based indices with 0s as place-holders if ridx > 0: self.add_edge(cidx, num_cols + ridx - 1) diff --git a/src/sage/graphs/generators/random.py b/src/sage/graphs/generators/random.py index f2c5b726e44..23213e01382 100644 --- a/src/sage/graphs/generators/random.py +++ b/src/sage/graphs/generators/random.py @@ -2259,7 +2259,7 @@ def RandomBicubicPlanar(n, seed=None): INPUT: - `n` -- an integer (at least `1`) + - ``n`` -- integer (at least `1`) - ``seed`` -- a ``random.Random`` seed or a Python ``int`` for the random number generator (default: ``None``) diff --git a/src/sage/graphs/graph_database.py b/src/sage/graphs/graph_database.py index ba737855c7e..8549b208af6 100644 --- a/src/sage/graphs/graph_database.py +++ b/src/sage/graphs/graph_database.py @@ -99,7 +99,7 @@ def data_to_degseq(data, graph6=None): """ degseq = Integer(data).digits(10) if not degseq: - # compute number of 0's in list from graph6 string + # compute number of 0s in list from graph6 string from sage.graphs.generic_graph_pyx import length_and_string_from_graph6 return length_and_string_from_graph6(str(graph6))[0] * [0] return degseq diff --git a/src/sage/graphs/tutte_polynomial.py b/src/sage/graphs/tutte_polynomial.py index 24abb665329..042fb4c286b 100644 --- a/src/sage/graphs/tutte_polynomial.py +++ b/src/sage/graphs/tutte_polynomial.py @@ -520,11 +520,11 @@ def tutte_polynomial(G, edge_selector=None, cache=None): INPUT: - - ``edge_selector`` (optional; method) this argument allows the user + - ``edge_selector`` -- method (optional); this argument allows the user to specify his own heuristic for selecting edges used in the deletion contraction recurrence - - ``cache`` -- (optional; dict) a dictionary to cache the Tutte + - ``cache`` -- (optional) dictionary to cache the Tutte polynomials generated in the recursive process. One will be created automatically if not provided. diff --git a/src/sage/groups/abelian_gps/abelian_group.py b/src/sage/groups/abelian_gps/abelian_group.py index 946ed6b65d0..0ad20d9d4fa 100644 --- a/src/sage/groups/abelian_gps/abelian_group.py +++ b/src/sage/groups/abelian_gps/abelian_group.py @@ -334,7 +334,7 @@ def _normalize(n, gens_orders=None, names='f'): INPUT: - See :func:`AbelianGroup` + See :func:`AbelianGroup`. OUTPUT: diff --git a/src/sage/groups/fqf_orthogonal.py b/src/sage/groups/fqf_orthogonal.py index 505b6669fcd..96cd198a536 100644 --- a/src/sage/groups/fqf_orthogonal.py +++ b/src/sage/groups/fqf_orthogonal.py @@ -275,7 +275,7 @@ def _preserves_form(self, f): INPUT: - Something that acts on the domain. + - ``f`` -- something that acts on the domain EXAMPLES:: diff --git a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx index e33fa20ae4b..f8d9aaf2c1b 100644 --- a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx +++ b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx @@ -410,35 +410,36 @@ cdef aut_gp_and_can_lab *get_aut_gp_and_can_lab(void *S, Traverse the search space for subgroup/canonical label calculation. INPUT: - S -- pointer to the structure - partition -- PartitionStack representing a partition of the points - len_partition -- length of the partition - n -- the number of points (points are assumed to be 0,1,...,n-1) - canonical_label -- whether to search for canonical label; if True, return + + - ``S`` -- pointer to the structure + - ``partition`` -- PartitionStack representing a partition of the points + - ``len_partition`` -- length of the partition + - ``n`` -- the number of points (points are assumed to be 0,1,...,n-1) + - ``canonical_label`` -- whether to search for canonical label; if True, return the permutation taking S to its canonical label - all_children_are_equivalent -- pointer to a function + - ``all_children_are_equivalent`` -- pointer to a function INPUT: - PS -- pointer to a partition stack - S -- pointer to the structure + - ``PS`` -- pointer to a partition stack + - ``S`` -- pointer to the structure OUTPUT: - bint -- returns True if it can be determined that all refinements below - the current one will result in an equivalent discrete partition - refine_and_return_invariant -- pointer to a function + bint; returns ``True`` if it can be determined that all refinements below + the current one will result in an equivalent discrete partition + - ``refine_and_return_invariant`` -- pointer to a function INPUT: - PS -- pointer to a partition stack - S -- pointer to the structure - alpha -- an array consisting of numbers, which indicate the starting - positions of the cells to refine against (will likely be modified) + - ``PS`` -- pointer to a partition stack + - ``S`` -- pointer to the structure + - ``alpha`` -- an array consisting of numbers, which indicate the starting + positions of the cells to refine against (will likely be modified) OUTPUT: - int -- returns an invariant under application of arbitrary permutations - compare_structures -- pointer to a function + integer; returns an invariant under application of arbitrary permutations + - ``compare_structures`` -- pointer to a function INPUT: - gamma_1, gamma_2 -- (list) permutations of the points of S1 and S2 - S1, S2 -- pointers to the structures - degree -- degree of gamma_1 and 2 + - ``gamma_1``, ``gamma_2`` -- (list) permutations of the points of S1 and S2 + - ``S1``, ``S2`` -- pointers to the structures + - ``degree`` -- degree of gamma_1 and 2 OUTPUT: - int -- 0 if gamma_1(S1) = gamma_2(S2), otherwise -1 or 1 (see docs for cmp), - such that the set of all structures is well-ordered + integer; 0 if gamma_1(S1) = gamma_2(S2), otherwise -1 or 1 (see docs for cmp), + such that the set of all structures is well-ordered .. NOTE:: diff --git a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx index 670c4a839c8..2775842c09d 100644 --- a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx +++ b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx @@ -400,69 +400,59 @@ cdef iterator *setup_canonical_generator(int degree, - ``all_children_are_equivalent`` -- pointer to a function INPUT: - PS -- pointer to a partition stack - S -- pointer to the structure + - ``PS`` -- pointer to a partition stack + - ``S`` -- pointer to the structure OUTPUT: - bint -- returns True if it can be determined that all refinements below - the current one will result in an equivalent discrete partition - + bint; returns ``True`` if it can be determined that all refinements below + the current one will result in an equivalent discrete partition - ``refine_and_return_invariant`` -- pointer to a function INPUT: - PS -- pointer to a partition stack - S -- pointer to the structure - alpha -- an array consisting of numbers, which indicate the starting - positions of the cells to refine against (will likely be modified) + - ``PS`` -- pointer to a partition stack + - ``S`` -- pointer to the structure + - ``alpha`` -- an array consisting of numbers, which indicate the starting + positions of the cells to refine against (will likely be modified) OUTPUT: - int -- returns an invariant under application of arbitrary permutations - + integer; returns an invariant under application of arbitrary permutations - ``compare_structures`` -- pointer to a function INPUT: - gamma_1, gamma_2 -- (list) permutations of the points of S1 and S2 - S1, S2 -- pointers to the structures - degree -- degree of gamma_1 and 2 + - ``gamma_1``, ``gamma_2`` -- (list) permutations of the points of S1 and S2 + - ``S1``, ``S2`` -- pointers to the structures + - ``degree`` -- degree of gamma_1 and 2 OUTPUT: - int -- 0 if gamma_1(S1) = gamma_2(S2), otherwise -1 or 1 (see docs for cmp), - such that the set of all structures is well-ordered - + integer; 0 if gamma_1(S1) = gamma_2(S2), otherwise -1 or 1 (see docs for cmp), + such that the set of all structures is well-ordered - ``generate_children`` -- pointer to a function INPUT: - S -- pointer to the structure - group -- pointer to an automorphism group (canonical relabeling is not guaranteed) - it -- preallocated iterator struct + - ``S`` -- pointer to the structure + - ``group`` -- pointer to an automorphism group (canonical relabeling is not guaranteed) + - ``it`` -- preallocated iterator struct OUTPUT: - iterator * -- pointer to an iterator over inequivalent augmentations of S - + iterator *; pointer to an iterator over inequivalent augmentations of S - ``apply_augmentation`` -- pointer to a function INPUT: - parent -- object to augment - aug -- the augmentation - child -- space to put the augmented object - degree -- pointer to an int, function should store the degree of the augmented object here - mem_err -- pointer where memory error can be reported - OUTPUT: - pointer to child - + - ``parent`` -- object to augment + - ``aug`` -- the augmentation + - ``child`` -- space to put the augmented object + - ``degree`` -- pointer to an int, function should store the degree of the augmented object here + - ``mem_err`` -- pointer where memory error can be reported + OUTPUT: pointer to child - ``free_object`` -- pointer to a function INPUT: - child -- object to be freed - + - ``child`` -- object to be freed - ``free_iter_data`` -- pointer to a function INPUT: - data -- data part of an iterator struct - + - ``data`` -- data part of an iterator struct - ``free_aug`` -- pointer to a function INPUT: - aug -- augmentation to be freed - + - ``aug`` -- augmentation to be freed - ``canonical_parent`` -- pointer to a function INPUT: - child -- pointer to the structure - parent -- space to store the canonical parent - permutation -- array representing a relabeling of the child - degree -- pointer to store the degree of the parent - mem_err -- pointer for indicating memory errors - OUTPUT: - pointer to the parent + - ``child`` -- pointer to the structure + - ``parent`` -- space to store the canonical parent + - ``permutation`` -- array representing a relabeling of the child + - ``degree`` -- pointer to store the degree of the parent + - ``mem_err`` -- pointer for indicating memory errors + OUTPUT: pointer to the parent - ``max_depth`` -- maximum depth of augmentations to be made from the seed object S diff --git a/src/sage/groups/perm_gps/partn_ref/data_structures.pxd b/src/sage/groups/perm_gps/partn_ref/data_structures.pxd index eb3608cd55b..a6841f43f9f 100644 --- a/src/sage/groups/perm_gps/partn_ref/data_structures.pxd +++ b/src/sage/groups/perm_gps/partn_ref/data_structures.pxd @@ -141,11 +141,13 @@ cdef inline int OP_merge_list_perm(OrbitPartition *OP, int *gamma) noexcept: Joins the cells of OP which intersect the same orbit of gamma. INPUT: - gamma - an integer array representing i -> gamma[i]. + + - ``gamma`` - an integer array representing ``i -> gamma[i]``. OUTPUT: - 1 - something changed - 0 - orbits of gamma all contained in cells of OP + + - 1 -- something changed + - 0 -- orbits of gamma all contained in cells of OP """ cdef int i, i_root, gamma_i_root, changed = 0 for i from 0 <= i < OP.degree: @@ -319,13 +321,13 @@ cdef inline int split_point_and_refine(PartitionStack *PS, int v, void *S, the refinement function. INPUT: - PS -- the partition stack to refine - v -- the point to split - S -- the structure - refine_and_return_invariant -- the refinement function provided - cells_to_refine_by -- an array, contents ignored - group -- the containing group, NULL for full S_n - perm_stack -- represents a partial traversal decomposition for group + - ``PS`` -- the partition stack to refine + - ``v`` -- the point to split + - ``S`` -- the structure + - ``refine_and_return_invariant`` -- the refinement function provided + - ``cells_to_refine_by`` -- an array, contents ignored + - ``group`` -- the containing group, NULL for full S_n + - ``perm_stack`` -- represents a partial traversal decomposition for group """ PS.depth += 1 PS_clear(PS) diff --git a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx index 4aa96f13220..d4cedec1f3c 100644 --- a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx +++ b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx @@ -280,38 +280,38 @@ cdef int double_coset(void *S1, void *S2, PartitionStack *partition1, int *order Traverse the search space for double coset calculation. INPUT: - S1, S2 -- pointers to the structures - partition1 -- PartitionStack of depth 0 and degree n, - whose first partition is of the points of S1 - ordering2 -- an ordering of the points of S2 representing a second partition - n -- the number of points (points are assumed to be 0,1,...,n-1) - all_children_are_equivalent -- pointer to a function + - ``S1``, ``S2`` -- pointers to the structures + - ``partition1`` -- PartitionStack of depth 0 and degree n, + whose first partition is of the points of S1 + - ``ordering2`` -- an ordering of the points of S2 representing a second partition + - ``n`` -- the number of points (points are assumed to be 0,1,...,n-1) + - ``all_children_are_equivalent`` -- pointer to a function INPUT: - PS -- pointer to a partition stack - S -- pointer to the structure + - ``PS`` -- pointer to a partition stack + - ``S`` -- pointer to the structure OUTPUT: - bint -- returns True if it can be determined that all refinements below - the current one will result in an equivalent discrete partition - refine_and_return_invariant -- pointer to a function + bint; returns True if it can be determined that all refinements below + the current one will result in an equivalent discrete partition + - ``refine_and_return_invariant`` -- pointer to a function INPUT: - PS -- pointer to a partition stack - S -- pointer to the structure - alpha -- an array consisting of numbers, which indicate the starting - positions of the cells to refine against (will likely be modified) + - ``PS`` -- pointer to a partition stack + -n``S`` -- pointer to the structure + - ``alpha`` -- an array consisting of numbers, which indicate the starting + positions of the cells to refine against (will likely be modified) OUTPUT: - int -- returns an invariant under application of arbitrary permutations + integer; returns an invariant under application of arbitrary permutations compare_structures -- pointer to a function INPUT: - gamma_1, gamma_2 -- (list) permutations of the points of S1 and S2 - S1, S2 -- pointers to the structures - degree -- degree of gamma_1 and 2 + - ``gamma_1``, ``gamma_2`` -- (list) permutations of the points of S1 and S2 + - ``S1``, ``S2`` -- pointers to the structures + - ``degree`` -- degree of gamma_1 and 2 OUTPUT: - int -- 0 if gamma_1(S1) = gamma_2(S2), otherwise -1 or 1 (see docs for cmp), - such that the set of all structures is well-ordered - input_group -- either a specified group to limit the search to, - or NULL for the full symmetric group - isom -- space to store the isomorphism to, - or NULL if isomorphism is not needed + integer; 0 if gamma_1(S1) = gamma_2(S2), otherwise -1 or 1 (see docs for cmp), + such that the set of all structures is well-ordered + - ``input_group`` -- either a specified group to limit the search to, + or NULL for the full symmetric group + - ``isom`` -- space to store the isomorphism to, + or NULL if isomorphism is not needed .. NOTE:: diff --git a/src/sage/groups/perm_gps/permgroup_named.py b/src/sage/groups/perm_gps/permgroup_named.py index 8137fab3556..5c153b93d4c 100644 --- a/src/sage/groups/perm_gps/permgroup_named.py +++ b/src/sage/groups/perm_gps/permgroup_named.py @@ -948,11 +948,11 @@ class DiCyclicGroup(PermutationGroup_unique): """ def __init__(self, n): r""" - The dicyclic group of order `4*n`, as a permutation group. + The dicyclic group of order `4n`, as a permutation group. INPUT: - n -- a positive integer, two or greater + - ``n`` -- a positive integer; 2 or greater EXAMPLES:: diff --git a/src/sage/homology/matrix_utils.py b/src/sage/homology/matrix_utils.py index 360ec6dc798..b44a25060d5 100644 --- a/src/sage/homology/matrix_utils.py +++ b/src/sage/homology/matrix_utils.py @@ -56,7 +56,7 @@ def dhsw_snf(mat, verbose=False): Suppose that there were `N` of these. The resulting matrix should be much smaller; we then feed it - to Sage's ``elementary_divisors`` function, and prepend `N` 1's to + to Sage's ``elementary_divisors`` function, and prepend `N` 1s to account for the rows deleted in the previous step. EXAMPLES:: diff --git a/src/sage/interfaces/frobby.py b/src/sage/interfaces/frobby.py index 5eef9629fa7..75200dc0694 100644 --- a/src/sage/interfaces/frobby.py +++ b/src/sage/interfaces/frobby.py @@ -145,11 +145,11 @@ def hilbert(self, monomial_ideal): INPUT: - monomial_ideal -- A monomial ideal. + - ``monomial_ideal`` -- a monomial ideal OUTPUT: - A polynomial in the same ring as the ideal. + A polynomial in the same ring as the ideal. EXAMPLES:: diff --git a/src/sage/interfaces/kash.py b/src/sage/interfaces/kash.py index a08d33d9a08..55caabcb795 100644 --- a/src/sage/interfaces/kash.py +++ b/src/sage/interfaces/kash.py @@ -460,11 +460,12 @@ def __init__(self, server_tmpdir=None): """ INPUT: - max_workspace_size -- (default: ``None``) - set maximal workspace memory usage to - stands for byte-wise allocation - k stands for kilobyte-wise allocation - m stands for megabyte-wise allocation + + - ``max_workspace_size`` -- (default: ``None``) + set maximal workspace memory usage to + stands for byte-wise allocation + k stands for kilobyte-wise allocation + m stands for megabyte-wise allocation """ cmd = "kash3 -b -c -d " if max_workspace_size is not None: diff --git a/src/sage/interfaces/scilab.py b/src/sage/interfaces/scilab.py index 63eeb2d5220..c2d689ef059 100644 --- a/src/sage/interfaces/scilab.py +++ b/src/sage/interfaces/scilab.py @@ -405,10 +405,10 @@ def sage2scilab_matrix_string(self, A): Return a Scilab matrix from a Sage matrix. INPUT: - A Sage matrix with entries in the rationals or reals. - OUTPUT: - A string that evaluates to a Scilab matrix. + - ``A`` -- Sage matrix with entries in the rationals or reals + + OUTPUT: string that evaluates to a Scilab matrix EXAMPLES:: diff --git a/src/sage/knots/knot.py b/src/sage/knots/knot.py index bcf2dad0c34..f2b42fad63a 100644 --- a/src/sage/knots/knot.py +++ b/src/sage/knots/knot.py @@ -566,7 +566,8 @@ def from_dowker_code(self, code): INPUT: - a list of signed even numbers, the Dowker-Thistlethwaite code of a knot + - ``code`` -- list of signed even numbers; the Dowker-Thistlethwaite + code of a knot OUTPUT: a knot diff --git a/src/sage/libs/ntl/ntl_GF2E.pyx b/src/sage/libs/ntl/ntl_GF2E.pyx index 14dd9a12d1d..f0a576bd693 100644 --- a/src/sage/libs/ntl/ntl_GF2E.pyx +++ b/src/sage/libs/ntl/ntl_GF2E.pyx @@ -91,12 +91,12 @@ cdef class ntl_GF2E(): NTL. So e.g. '[0 1]' == '0x2' == x. INPUT: - x -- value to be assigned to this element. Same types as - ntl.GF2X() are accepted. - modulus -- the context/modulus of the field - OUTPUT: - a new ntl.GF2E element + - ``x`` -- value to be assigned to this element. Same types as + ``ntl.GF2X()`` are accepted. + - ``modulus`` -- the context/modulus of the field + + OUTPUT: a new ``ntl.GF2E`` element EXAMPLES:: @@ -425,9 +425,8 @@ cdef class ntl_GF2E(): sage: e.list() [1, 1, 1, 1, 1, 1, 1, 1] - OUTPUT: - a list of digits representing the coefficients in this element's - polynomial representation + OUTPUT: list of digits representing the coefficients in this element's + polynomial representation """ cdef int i cdef GF2X_c x = GF2E_rep(self.x) diff --git a/src/sage/libs/ntl/ntl_GF2X.pyx b/src/sage/libs/ntl/ntl_GF2X.pyx index 85fdac3bef2..7f790b540e0 100644 --- a/src/sage/libs/ntl/ntl_GF2X.pyx +++ b/src/sage/libs/ntl/ntl_GF2X.pyx @@ -102,10 +102,10 @@ cdef class ntl_GF2X(): extension fields over GF(2) (uses modulus). INPUT: - x -- value to be assigned to this element. See examples. - OUTPUT: - a new ntl.GF2X element + - ``x`` -- value to be assigned to this element. See examples. + + OUTPUT: a new ntl.GF2X element EXAMPLES:: @@ -369,7 +369,8 @@ cdef class ntl_GF2X(): `X^i`). INPUT: - i -- offset/power of X + + - ``i`` -- offset/power of X EXAMPLES:: @@ -388,7 +389,8 @@ cdef class ntl_GF2X(): `X^i`). INPUT: - i -- offset/power of X + + - ``i`` -- offset/power of X EXAMPLES:: @@ -406,7 +408,8 @@ cdef class ntl_GF2X(): Return GCD of ``self`` and ``other``. INPUT: - other -- ntl.GF2X + + - ``other`` -- ntl.GF2X EXAMPLES:: @@ -430,7 +433,8 @@ cdef class ntl_GF2X(): r = s * self + t * other. INPUT: - other -- ntl.GF2X + + - ``other`` -- ntl.GF2X EXAMPLES:: @@ -474,9 +478,8 @@ cdef class ntl_GF2X(): sage: e.list() [1, 1, 1, 1, 1, 1, 1, 1] - OUTPUT: - a list of digits representing the coefficients in this element's - polynomial representation + OUTPUT: list of digits representing the coefficients in this element's + polynomial representation """ return [self[i] for i in range(GF2X_deg(self.x)+1)] diff --git a/src/sage/libs/ntl/ntl_ZZ_pContext.pyx b/src/sage/libs/ntl/ntl_ZZ_pContext.pyx index d084f6dc0ce..0a4d5b14e68 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pContext.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pContext.pyx @@ -167,7 +167,8 @@ cdef class ntl_ZZ_pContext_factory(): Create a new ZZ_pContext. INPUT: - v -- an ntl_ZZ + + - ``v`` -- an ntl_ZZ """ cdef ntl_ZZ_pContext_class context if v in self.context_dict: diff --git a/src/sage/libs/ntl/ntl_mat_GF2E.pyx b/src/sage/libs/ntl/ntl_mat_GF2E.pyx index c5f92620478..aa24c3f8812 100644 --- a/src/sage/libs/ntl/ntl_mat_GF2E.pyx +++ b/src/sage/libs/ntl/ntl_mat_GF2E.pyx @@ -54,10 +54,11 @@ cdef class ntl_mat_GF2E(): Construct a matrix over ntl.GF2E. INPUT: - modulus -- GF2E context - nrows -- number of rows - ncols -- number of columns - v -- either a list or a matrix over GF(2^x) + + - ``modulus`` -- GF2E context + - ``nrows`` -- number of rows + - ``ncols`` -- number of columns + - ``v`` -- either a list or a matrix over GF(2^x) EXAMPLES:: @@ -519,8 +520,7 @@ cdef class ntl_mat_GF2E(): - ``k`` -- optional GF(2**deg) - OUTPUT: - Matrix over k + OUTPUT: Matrix over k EXAMPLES:: diff --git a/src/sage/libs/ntl/ntl_mat_ZZ.pyx b/src/sage/libs/ntl/ntl_mat_ZZ.pyx index b6371bd2310..489b4639733 100644 --- a/src/sage/libs/ntl/ntl_mat_ZZ.pyx +++ b/src/sage/libs/ntl/ntl_mat_ZZ.pyx @@ -491,11 +491,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: @@ -561,11 +562,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: @@ -631,11 +633,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: @@ -701,11 +704,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: @@ -771,11 +775,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: @@ -841,11 +846,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: @@ -911,11 +917,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: @@ -981,11 +988,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: @@ -1051,11 +1059,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: @@ -1121,11 +1130,12 @@ cdef class ntl_mat_ZZ(): precision uniformly throughout. INPUT: - U -- optional permutation matrix (see LLL, default: None) - delta -- reduction parameter (default: 0.99) - BlockSize -- see above (default: 10) - prune -- see above (default: 0) - verbose -- print verbose output (default: ``False``) + + - ``U`` -- optional permutation matrix (see LLL, default: None) + - ``delta`` -- reduction parameter (default: 0.99) + - ``BlockSize`` -- see above (default: 10) + - ``prune`` -- see above (default: 0) + - ``verbose`` -- print verbose output (default: ``False``) EXAMPLES:: diff --git a/src/sage/matrix/change_ring.pyx b/src/sage/matrix/change_ring.pyx index f942b753275..e5b5ee5c38f 100644 --- a/src/sage/matrix/change_ring.pyx +++ b/src/sage/matrix/change_ring.pyx @@ -15,10 +15,10 @@ def integer_to_real_double_dense(Matrix_integer_dense A): real double entries. INPUT: - A -- a dense matrix over the integers - OUTPUT: - -- a dense real double matrix + - ``A`` -- a dense matrix over the integers + + OUTPUT: a dense real double matrix EXAMPLES:: diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx index 545882512b3..2c52268676b 100644 --- a/src/sage/matrix/matrix2.pyx +++ b/src/sage/matrix/matrix2.pyx @@ -1570,9 +1570,9 @@ cdef class Matrix(Matrix1): maximal permanental minor is just the permanent. For a (0,1)-matrix `A` the permanental `k`-minor - counts the number of different selections of `k` 1's of - `A` with no two of the 1's on the same row and no two of the - 1's on the same column. + counts the number of different selections of `k` 1s of + `A` with no two of the 1s on the same row and no two of the + 1s on the same column. See Brualdi and Ryser: Combinatorial Matrix Theory, p. 203. Note the typo `p_0(A) = 0` in that reference! For applications @@ -1865,7 +1865,7 @@ cdef class Matrix(Matrix1): - ``complement`` -- boolean (default: ``False``); whether we consider the rook vector of the complement matrix. If set to ``True`` then the matrix must have entries in {0, 1} and the complement matrix is the - one for which the 0's are replaced by 1's and 1's by 0's. + one for which the 0s are replaced by 1s and 1s by 0s. - ``use_complement`` -- boolean (default: ``None``); whether to compute the rook vector of a (0,1)-matrix from its complement. By default this is @@ -12955,14 +12955,11 @@ cdef class Matrix(Matrix1): r""" Return the Cholesky decomposition of a Hermitian matrix. - INPUT: - - A positive-definite matrix. Generally, the base ring for the - entries of the matrix needs to be a subfield of the algebraic - numbers (``QQbar``). Examples include the rational numbers - (``QQ``), some number fields, and real algebraic numbers and - the algebraic numbers themselves. Symbolic matrices can also - occasionally be factored. + Applies to a positive-definite matrix. Generally, the base ring for the + entries of the matrix needs to be a subfield of the algebraic numbers + (``QQbar``). Examples include the rational numbers (``QQ``), some + number fields, and real algebraic numbers and the algebraic numbers + themselves. Symbolic matrices can also occasionally be factored. OUTPUT: diff --git a/src/sage/matrix/matrix_cyclo_dense.pyx b/src/sage/matrix/matrix_cyclo_dense.pyx index 0b95a00f011..bc4fd6466cb 100644 --- a/src/sage/matrix/matrix_cyclo_dense.pyx +++ b/src/sage/matrix/matrix_cyclo_dense.pyx @@ -433,8 +433,9 @@ cdef class Matrix_cyclo_dense(Matrix_dense): underlying data and pickle version. OUTPUT: - data -- output of pickle - version -- integer + + - data; output of pickle + - version; integer EXAMPLES:: @@ -800,8 +801,7 @@ cdef class Matrix_cyclo_dense(Matrix_dense): """ Return the negative of this matrix. - OUTPUT: - matrix + OUTPUT: matrix EXAMPLES:: diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx index ec2d084a543..2e8b91e1b0c 100644 --- a/src/sage/matrix/matrix_double_dense.pyx +++ b/src/sage/matrix/matrix_double_dense.pyx @@ -908,7 +908,7 @@ cdef class Matrix_double_dense(Matrix_numpy_dense): Effectively, ``P`` permutes the rows of ``A``. Then ``L`` can be viewed as a sequence of row operations on this matrix, where each operation is adding a multiple of a row to a - subsequent row. There is no scaling (thus 1's on the diagonal + subsequent row. There is no scaling (thus 1s on the diagonal of ``L``) and no row-swapping (``P`` does that). As a result ``U`` is close to being the result of Gaussian-elimination. However, round-off errors can make it hard to determine @@ -2010,9 +2010,7 @@ cdef class Matrix_double_dense(Matrix_numpy_dense): Return a factorization into a unitary matrix and an upper-triangular matrix. - INPUT: - - Any matrix over ``RDF`` or ``CDF``. + Applies to any matrix over ``RDF`` or ``CDF``. OUTPUT: @@ -3448,9 +3446,7 @@ cdef class Matrix_double_dense(Matrix_numpy_dense): eigenvalues and only positive determinants of leading principal submatrices. - INPUT: - - Any matrix over ``RDF`` or ``CDF``. + Applies to any matrix over ``RDF`` or ``CDF``. OUTPUT: diff --git a/src/sage/matrix/matrix_double_sparse.pyx b/src/sage/matrix/matrix_double_sparse.pyx index 5cd2e4b1614..44d86e41be9 100644 --- a/src/sage/matrix/matrix_double_sparse.pyx +++ b/src/sage/matrix/matrix_double_sparse.pyx @@ -97,9 +97,7 @@ cdef class Matrix_double_sparse(Matrix_generic_sparse): r""" Return the Cholesky decomposition of a Hermitian matrix. - INPUT: - - A positive-definite matrix over ``RDF`` or ``CDF``. + Applies to a positive-definite matrix over ``RDF`` or ``CDF``. OUTPUT: diff --git a/src/sage/matrix/matrix_gf2e_dense.pyx b/src/sage/matrix/matrix_gf2e_dense.pyx index 3bc6c9d13d1..b8660ad08dc 100644 --- a/src/sage/matrix/matrix_gf2e_dense.pyx +++ b/src/sage/matrix/matrix_gf2e_dense.pyx @@ -235,6 +235,7 @@ cdef class Matrix_gf2e_dense(matrix_dense.Matrix_dense): A[i,j] = value without bound checks. INPUT: + - ``i`` -- row index - ``j`` -- column index - ``value`` -- a finite field element (not checked but assumed) @@ -262,6 +263,7 @@ cdef class Matrix_gf2e_dense(matrix_dense.Matrix_dense): Get A[i,j] without bound checks. INPUT: + - ``i`` -- row index - ``j`` -- column index diff --git a/src/sage/matrix/matrix_gfpn_dense.pyx b/src/sage/matrix/matrix_gfpn_dense.pyx index 29c86aa5695..b122edb1489 100644 --- a/src/sage/matrix/matrix_gfpn_dense.pyx +++ b/src/sage/matrix/matrix_gfpn_dense.pyx @@ -109,8 +109,8 @@ cdef class FieldConverter_class: """ INPUT: - A finite field with Givaro implementation and at most 251 - elements. These assumptions are not tested. + - ``field`` -- a finite field with Givaro implementation and at most 251 + elements. These assumptions are not tested. EXAMPLES:: @@ -202,8 +202,8 @@ cdef class PrimeFieldConverter_class(FieldConverter_class): """ INPUT: - A finite *prime* field with at most 251 elements. - This assumption is not tested. + - ``field`` -- a finite *prime* field with at most 251 elements. + This assumption is not tested. EXAMPLES:: diff --git a/src/sage/matrix/matrix_integer_dense_hnf.py b/src/sage/matrix/matrix_integer_dense_hnf.py index 5bdc2314232..d27247becc8 100644 --- a/src/sage/matrix/matrix_integer_dense_hnf.py +++ b/src/sage/matrix/matrix_integer_dense_hnf.py @@ -287,13 +287,12 @@ def add_column_fallback(B, a, proof): INPUT: - B -- a square matrix (may be singular) - a -- an n x 1 matrix, where B has n rows - proof -- boolean; whether to prove result correct - - OUTPUT: + - ``B`` -- a square matrix (may be singular) + - ``a`` -- an n x 1 matrix, where B has n rows + - ``proof`` -- boolean; whether to prove result correct - - x -- a vector such that H' = H_B.augment(x) is the HNF of A = B.augment(a) + OUTPUT: x; a vector such that ``H' = H_B.augment(x)`` is the HNF of + ``A = B.augment(a)`` EXAMPLES:: diff --git a/src/sage/matrix/operation_table.py b/src/sage/matrix/operation_table.py index 23869f311ad..93c864c9cce 100644 --- a/src/sage/matrix/operation_table.py +++ b/src/sage/matrix/operation_table.py @@ -68,6 +68,7 @@ class OperationTable(SageObject): perhaps when the set is infinite. OUTPUT: + An object with methods that abstracts multiplication tables, addition tables, Cayley tables, etc. It should be general enough to be useful for any finite algebraic structure @@ -493,6 +494,7 @@ def _name_maker(self, names): Helper function to create names of elements of algebraic structures. INPUT: + Identical to the input for :class:`OperationTable` and :meth:`change_names`, so look there for details. @@ -606,6 +608,7 @@ def __getitem__(self, pair): - ``pair`` -- two elements of the structure OUTPUT: + The element of the structure computed by the operation for the two input elements (in the order provided). @@ -667,6 +670,7 @@ def __eq__(self, other): - ``other`` -- a second table to compare to ``self`` OUTPUT: + Tables are equal if they have the same operation and elements. EXAMPLES:: @@ -813,6 +817,7 @@ def translation(self): Return a dictionary associating names with elements. OUTPUT: + A dictionary whose keys are strings used as names for entries of the table and values that are the actual elements of the algebraic structure. @@ -833,6 +838,7 @@ def table(self): using integers to reference the elements. OUTPUT: + The rows of the table, as a list of rows, each row being a list of integer entries. The integers correspond to the order of the elements in the headings of the table diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py index 36285d07b92..08f57cb1e50 100644 --- a/src/sage/matrix/special.py +++ b/src/sage/matrix/special.py @@ -2379,7 +2379,7 @@ def companion_matrix(poly, format='right'): M = sage.matrix.constructor.matrix(poly.universe(), n, n) except TypeError: raise TypeError("unable to find common ring for coefficients from polynomial") - # 1's below diagonal, or above diagonal + # 1s below diagonal, or above diagonal if format in ['right', 'top']: for i in range(n - 1): M[i+1, i] = 1 diff --git a/src/sage/misc/banner.py b/src/sage/misc/banner.py index bd0dd7160b1..29c95ea54aa 100644 --- a/src/sage/misc/banner.py +++ b/src/sage/misc/banner.py @@ -121,10 +121,6 @@ def version_dict(): """ A dictionary describing the version of Sage. - INPUT: - - nothing - OUTPUT: dictionary with keys 'major', 'minor', 'tiny', 'prerelease' This process the Sage version string and produces a dictionary. diff --git a/src/sage/misc/fpickle.pyx b/src/sage/misc/fpickle.pyx index 5b110f5952f..fd192f1bf02 100644 --- a/src/sage/misc/fpickle.pyx +++ b/src/sage/misc/fpickle.pyx @@ -74,7 +74,7 @@ def pickle_function(func): INPUT: - func -- a Python function + - ``func`` -- a Python function OUTPUT: string diff --git a/src/sage/misc/function_mangling.pyx b/src/sage/misc/function_mangling.pyx index d68c0da8ce0..8cf4d6e2efa 100644 --- a/src/sage/misc/function_mangling.pyx +++ b/src/sage/misc/function_mangling.pyx @@ -233,7 +233,7 @@ cdef class ArgumentFixer: INPUT: - Any positional or named arguments + - ``*args``, ``**kwds`` -- any positional or named arguments OUTPUT: we return a tuple diff --git a/src/sage/misc/weak_dict.pyx b/src/sage/misc/weak_dict.pyx index e5e0b7731f8..a247cb03fc7 100644 --- a/src/sage/misc/weak_dict.pyx +++ b/src/sage/misc/weak_dict.pyx @@ -168,7 +168,7 @@ cdef class WeakValueDictEraser: """ INPUT: - A :class:`sage.misc.weak_dict.WeakValueDictionary`. + - ``D`` -- a :class:`sage.misc.weak_dict.WeakValueDictionary` EXAMPLES:: @@ -186,7 +186,7 @@ cdef class WeakValueDictEraser: """ INPUT: - A weak reference with key. + - ``r`` -- a weak reference with key When this is called with a weak reference ``r``, then an entry from the dictionary pointed to by ``self.D`` is removed that has ``r`` as a value diff --git a/src/sage/modular/abvar/abvar_newform.py b/src/sage/modular/abvar/abvar_newform.py index fa98585619b..1159de73894 100644 --- a/src/sage/modular/abvar/abvar_newform.py +++ b/src/sage/modular/abvar/abvar_newform.py @@ -36,7 +36,8 @@ def __init__(self, f, internal_name=False): newform `f`. INPUT: - f -- a newform + + - ``f`` -- a newform EXAMPLES:: diff --git a/src/sage/modular/abvar/lseries.py b/src/sage/modular/abvar/lseries.py index 661b54f8153..16f45a75394 100644 --- a/src/sage/modular/abvar/lseries.py +++ b/src/sage/modular/abvar/lseries.py @@ -320,7 +320,7 @@ def __eq__(self, other): INPUT: - other -- object + - ``other`` -- object OUTPUT: boolean @@ -347,7 +347,7 @@ def __ne__(self, other): INPUT: - other -- object + - ``other`` -- object OUTPUT: boolean diff --git a/src/sage/modular/arithgroup/congroup_gammaH.py b/src/sage/modular/arithgroup/congroup_gammaH.py index 44f9b380376..11be9df4726 100644 --- a/src/sage/modular/arithgroup/congroup_gammaH.py +++ b/src/sage/modular/arithgroup/congroup_gammaH.py @@ -655,9 +655,7 @@ def _reduce_coset(self, uu, vv): - ``uu`` -- integer - ``vv`` -- integer - OUTPUT: - - pair of integers that are equivalent to (uu,vv). + OUTPUT: pair of integers that are equivalent to (uu,vv) .. NOTE:: diff --git a/src/sage/modular/hecke/module.py b/src/sage/modular/hecke/module.py index 84f94a2e183..6e0173b846b 100644 --- a/src/sage/modular/hecke/module.py +++ b/src/sage/modular/hecke/module.py @@ -1599,7 +1599,7 @@ def projection(self): got from rows `n` through `m` of `B^{-1}`. This is because projection with respect to the B basis is just given by an `m-n+1` row slice `P` of a diagonal - matrix D with 1's in the `n` through `m` positions, + matrix D with 1s in the `n` through `m` positions, so projection with respect to the standard basis is given by `P\cdot B^{-1}`, which is just rows `n` through `m` of `B^{-1}`. diff --git a/src/sage/modular/hypergeometric_motive.py b/src/sage/modular/hypergeometric_motive.py index 07c4c4d3047..57193e40b24 100644 --- a/src/sage/modular/hypergeometric_motive.py +++ b/src/sage/modular/hypergeometric_motive.py @@ -417,7 +417,7 @@ def __init__(self, cyclotomic=None, alpha_beta=None, gamma_list=None): INPUT: - three possibilities are offered, each describing a quotient + Three possibilities are offered, each describing a quotient of products of cyclotomic polynomials. - ``cyclotomic`` -- a pair of lists of nonnegative integers, diff --git a/src/sage/modular/modform/cuspidal_submodule.py b/src/sage/modular/modform/cuspidal_submodule.py index 90270ad7841..4b8777a7fa3 100644 --- a/src/sage/modular/modform/cuspidal_submodule.py +++ b/src/sage/modular/modform/cuspidal_submodule.py @@ -670,8 +670,9 @@ def _convert_matrix_from_modsyms(symbs, T): the Atkin-Lehner operators, for instance, when there are oldforms present. OUTPUT: - A pair `(T_e, ps)` with `T_e` the converted matrix and `ps` a list - of pivot elements of the echelon basis. + + A pair `(T_e, ps)` with `T_e` the converted matrix and `ps` a list + of pivot elements of the echelon basis. EXAMPLES:: diff --git a/src/sage/modular/modform/eisenstein_submodule.py b/src/sage/modular/modform/eisenstein_submodule.py index 77b5de6976a..6bdba1e47d6 100644 --- a/src/sage/modular/modform/eisenstein_submodule.py +++ b/src/sage/modular/modform/eisenstein_submodule.py @@ -591,7 +591,7 @@ class EisensteinSubmodule_eps(EisensteinSubmodule_params): #raise NotImplementedError, "must restrict scalars down correctly." -def cyclotomic_restriction(L,K): +def cyclotomic_restriction(L, K): r""" Given two cyclotomic fields L and K, compute the compositum M of K and L, and return a function and the index [M:K]. The @@ -599,7 +599,7 @@ def cyclotomic_restriction(L,K): INPUT: - element alpha in L + - ``L``, ``K`` -- element alpha in L OUTPUT: @@ -636,11 +636,11 @@ def g(x): INPUT: - element alpha in L + - ``x`` -- element alpha in L OUTPUT: - a polynomial `f(x)` in `K[x]` such that `f(\zeta_m) = \alpha`, + A polynomial `f(x)` in `K[x]` such that `f(\zeta_m) = \alpha`, where we view alpha as living in `M`. (Note that `\zeta_m` generates `M`, not `L`.) @@ -659,15 +659,14 @@ def g(x): euler_phi(L.zeta_order())//euler_phi(K.zeta_order()) -def cyclotomic_restriction_tower(L,K): +def cyclotomic_restriction_tower(L, K): """ Suppose L/K is an extension of cyclotomic fields and L=Q(zeta_m). This function computes a map with the following property: - INPUT: - an element alpha in L + - ``L``, ``K`` -- an element alpha in L OUTPUT: @@ -698,7 +697,7 @@ def z(a): INPUT: - an element alpha in L + - ``a`` -- element alpha in L OUTPUT: diff --git a/src/sage/modular/modsym/ambient.py b/src/sage/modular/modsym/ambient.py index 1257e957c52..405505e93f4 100644 --- a/src/sage/modular/modsym/ambient.py +++ b/src/sage/modular/modsym/ambient.py @@ -502,8 +502,8 @@ def _action_on_modular_symbols(self, g): INPUT: - `g` (list) -- `g=[a,b,c,d]` where `a,b,c,d` are integers - defining a `2\times2` integer matrix. + - ``g`` -- list; `g=[a,b,c,d]` where `a,b,c,d` are integers + defining a `2\times2` integer matrix OUTPUT: @@ -2831,7 +2831,7 @@ class ModularSymbolsAmbient_wt2_g0(ModularSymbolsAmbient_wtk_g0): """ def __init__(self, N, sign, F, custom_init=None, category=None): """ - Initialize a space of modular symbols. INPUT: + Initialize a space of modular symbols. INPUT: diff --git a/src/sage/modular/multiple_zeta.py b/src/sage/modular/multiple_zeta.py index a21b8d09edc..cfdc489a406 100644 --- a/src/sage/modular/multiple_zeta.py +++ b/src/sage/modular/multiple_zeta.py @@ -2432,7 +2432,7 @@ def phi_on_basis(L): INPUT: - a list of compositions, each composition in the hardcoded basis + - ``L`` -- list of compositions; each composition in the hardcoded basis This encodes a product of multiple zeta values. diff --git a/src/sage/modular/pollack_stevens/fund_domain.py b/src/sage/modular/pollack_stevens/fund_domain.py index 2b6e5f2555c..1c266da21b7 100644 --- a/src/sage/modular/pollack_stevens/fund_domain.py +++ b/src/sage/modular/pollack_stevens/fund_domain.py @@ -115,7 +115,7 @@ def __init__(self, N, reps, indices, rels, equiv_ind): r""" INPUT: - See :class:`PollackStevensModularDomain`. + See :class:`PollackStevensModularDomain`. EXAMPLES:: diff --git a/src/sage/modular/quasimodform/ring.py b/src/sage/modular/quasimodform/ring.py index 9a9bd1a999e..02d6228dc5b 100644 --- a/src/sage/modular/quasimodform/ring.py +++ b/src/sage/modular/quasimodform/ring.py @@ -321,7 +321,7 @@ def quasimodular_forms_of_weight(self, weight): INPUT: - - ``weight`` (int, Integer) + - ``weight`` -- (int, Integer) OUTPUT: a quasimodular forms space of the given weight diff --git a/src/sage/modules/fg_pid/fgp_module.py b/src/sage/modules/fg_pid/fgp_module.py index 5b044ee44a9..435796d83e5 100644 --- a/src/sage/modules/fg_pid/fgp_module.py +++ b/src/sage/modules/fg_pid/fgp_module.py @@ -978,7 +978,7 @@ def invariants(self, include_ones=False): r""" Return the diagonal entries of the Smith form of the relative matrix that defines ``self`` (see :meth:`._relative_matrix`) - padded with zeros, excluding 1's by default. Thus if ``v`` is the + padded with zeros, excluding 1s by default. Thus if ``v`` is the list of integers returned, then ``self`` is abstractly isomorphic to the product of cyclic groups `\ZZ/n\ZZ` where `n` is in ``v``. diff --git a/src/sage/modules/free_module.py b/src/sage/modules/free_module.py index 40bc7430f50..716f8534cba 100644 --- a/src/sage/modules/free_module.py +++ b/src/sage/modules/free_module.py @@ -4987,7 +4987,7 @@ def linear_dependence(self, vectors, zeros='left', check=True): list being empty, so this provides a test - see the examples below. The returned vectors are always independent, and with ``zeros`` set to - ``'left'`` they have 1's in their first nonzero entries and a qualitative + ``'left'`` they have 1s in their first nonzero entries and a qualitative disposition to having zeros in the low-index entries. With ``zeros`` set to ``'right'`` the situation is reversed with a qualitative disposition for zeros in the high-index entries. diff --git a/src/sage/modules/vector_integer_sparse.pyx b/src/sage/modules/vector_integer_sparse.pyx index c6dee834b54..8484c0a6a93 100644 --- a/src/sage/modules/vector_integer_sparse.pyx +++ b/src/sage/modules/vector_integer_sparse.pyx @@ -87,12 +87,15 @@ cdef Py_ssize_t mpz_binary_search(mpz_t* v, Py_ssize_t n, mpz_t x, Py_ssize_t* i obtain an ordered array. INPUT: - v -- array of mpz_t (integer) - n -- integer (length of array v) - x -- mpz_t (integer) + + - ``v`` -- array of mpz_t (integer) + - ``n`` -- integer (length of array v) + - ``x`` -- mpz_t (integer) + OUTPUT: - position of x (as a Py_ssize_t) - ins -- (call be pointer), the insertion point if x is not found. + + position of x (as a Py_ssize_t) + ins -- (call be pointer), the insertion point if x is not found. """ cdef Py_ssize_t i, j, k, c if n == 0: diff --git a/src/sage/modules/vector_rational_sparse.pyx b/src/sage/modules/vector_rational_sparse.pyx index 03073ef2b96..fcdaf2b7cf8 100644 --- a/src/sage/modules/vector_rational_sparse.pyx +++ b/src/sage/modules/vector_rational_sparse.pyx @@ -94,12 +94,15 @@ cdef Py_ssize_t mpq_binary_search(mpq_t* v, Py_ssize_t n, mpq_t x, Py_ssize_t* i obtain an ordered array. INPUT: - v -- array of mpq_t (rational) - n -- integer (length of array v) - x -- mpq_t (rational) + + - ``v`` -- array of mpq_t (rational) + - ``n`` -- integer (length of array v) + - ``x`` -- mpq_t (rational) + OUTPUT: - position of x (as an Py_ssize_t) - ins -- (call be pointer), the insertion point if x is not found. + + position of x (as an Py_ssize_t) + ins -- (call be pointer), the insertion point if x is not found. """ cdef Py_ssize_t i, j, k, c if n == 0: diff --git a/src/sage/monoids/string_monoid.py b/src/sage/monoids/string_monoid.py index 64592388b4d..61814c421c5 100644 --- a/src/sage/monoids/string_monoid.py +++ b/src/sage/monoids/string_monoid.py @@ -168,7 +168,7 @@ def __call__(self, x, check=True): Return ``x`` coerced into this free monoid. One can create a free binary string monoid element from a - Python string of 0's and 1's or list of integers. + Python string of 0s and 1s or list of integers. NOTE: Due to the ambiguity of the second generator '1' with the identity element '' of the monoid, the syntax S(1) is not @@ -288,7 +288,7 @@ def __call__(self, x, check=True): Return ``x`` coerced into this free monoid. One can create a free octal string monoid element from a - Python string of 0's to 7's or list of integers. + Python string of 0s to 7s or list of integers. EXAMPLES:: diff --git a/src/sage/monoids/string_ops.py b/src/sage/monoids/string_ops.py index 500762cb3e5..304e908c16b 100644 --- a/src/sage/monoids/string_ops.py +++ b/src/sage/monoids/string_ops.py @@ -95,8 +95,8 @@ def coincidence_discriminant(S, n=2): """ INPUT: - A tuple of strings, e.g. produced as decimation of transposition - ciphertext, or a sample plaintext. + - ``S`` --tuple of strings; e.g. produced as decimation of transposition + ciphertext, or a sample plaintext OUTPUT: