From b46509a753b2da4497d4b406da9faa7928116e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Sun, 9 Nov 2025 20:44:25 +0100 Subject: [PATCH] fixing a few typos --- src/sage/cpython/dict_del_by_value.pyx | 2 +- src/sage/geometry/lattice_polytope.py | 12 ++++++------ src/sage/graphs/generators/trees.pyx | 4 ++-- src/sage/graphs/graph.py | 2 +- src/sage/graphs/matching_covered_graph.py | 10 +++++----- src/sage/interfaces/khoca.py | 2 +- src/sage/modules/free_module.py | 2 +- .../rings/function_field/function_field_test.py | 16 ++++++++-------- src/sage/rings/polynomial/polydict.pyx | 2 +- src/sage/rings/polynomial/polynomial_element.pyx | 2 +- src/sage/schemes/curves/zariski_vankampen.py | 4 ++-- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/sage/cpython/dict_del_by_value.pyx b/src/sage/cpython/dict_del_by_value.pyx index a743218396d..ae12d2722ac 100644 --- a/src/sage/cpython/dict_del_by_value.pyx +++ b/src/sage/cpython/dict_del_by_value.pyx @@ -147,7 +147,7 @@ def test_del_dictitem_by_exact_value(D, value, h): - ``h`` -- the hash of the key under which to find ``value`` in ``D`` The underlying cdef function deletes an item from ``D`` that is in the - hash bucket determined by ``h`` and whose value is identic with + hash bucket determined by ``h`` and whose value is identical with ``value``. Of course, this only makes sense if the pairs ``(h, value)`` corresponding to items in ``D`` are pair-wise distinct. diff --git a/src/sage/geometry/lattice_polytope.py b/src/sage/geometry/lattice_polytope.py index 36d1731dba4..12136ad4ed6 100644 --- a/src/sage/geometry/lattice_polytope.py +++ b/src/sage/geometry/lattice_polytope.py @@ -450,8 +450,8 @@ def ReflexivePolytopes(dim): if _rp[dim] is None: db = DatabaseReflexivePolytopes() rp = read_all_polytopes( - os.path.join(os.path.dirname(db.absolute_filename()), - f'reflexive_polytopes_{dim}d')) + os.path.join(os.path.dirname(db.absolute_filename()), + f'reflexive_polytopes_{dim}d')) for n, p in enumerate(rp): # Data files have normal form of reflexive polytopes p.normal_form.set_cache(p._vertices) @@ -760,7 +760,7 @@ def _compute_embedding(self) -> None: # Absolute value helps to keep normals "inner" self._dual_embedding_scale = abs(basis.det()) dualbasis = matrix(ZZ, self._dual_embedding_scale * basis.inverse()) - self._dual_embedding_matrix = dualbasis.submatrix(0,0,M.ncols()) + self._dual_embedding_matrix = dualbasis.submatrix(0, 0, M.ncols()) def _compute_facets(self): r""" @@ -4008,7 +4008,7 @@ def skeleton_show(self, normal=None): raise NotImplementedError("skeleton view is implemented only in 3-d space") if normal is None: normal = [ZZ.random_element(20),ZZ.random_element(20),ZZ.random_element(20)] - normal = matrix(QQ,3,1,list(normal)) + normal = matrix(QQ, 3, 1, list(normal)) projectionm = normal.kernel().basis_matrix() positions = dict(enumerate([list(c) for c in (projectionm*self.points()).columns(copy=False)])) self.skeleton().show(pos=positions) @@ -4311,7 +4311,7 @@ def __init__(self, data, Delta_polar, check=True): """ if check and not Delta_polar.is_reflexive(): raise ValueError("nef-partitions can be constructed for reflexive " - "polytopes ony!") + "polytopes only!") self._vertex_to_part = tuple(int(el) for el in data) self._nparts = max(self._vertex_to_part) + 1 self._Delta_polar = Delta_polar @@ -5646,7 +5646,7 @@ def positive_integer_relations(points): # Use the new relation to remove negative entries in non-pivot columns for i in range(n_nonpivots): for j in range(n): - coef = relations[j,nonpivots[i]] + coef = relations[j, nonpivots[i]] if coef < 0: relations.add_multiple_of_row(j, n + i, -coef) # Get a new basis diff --git a/src/sage/graphs/generators/trees.pyx b/src/sage/graphs/generators/trees.pyx index 455c67a4dda..b5194ce470f 100644 --- a/src/sage/graphs/generators/trees.pyx +++ b/src/sage/graphs/generators/trees.pyx @@ -559,9 +559,9 @@ cdef class TreeIterator: sig_free(self.l) sig_free(self.current_level_sequence) - def __str__(self): + def __str__(self) -> str: r""" - Return a string representaiton of ``self``. + Return a string representation of ``self``. EXAMPLES:: diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py index 5814d00c6ac..b907cc866e4 100644 --- a/src/sage/graphs/graph.py +++ b/src/sage/graphs/graph.py @@ -2937,7 +2937,7 @@ def is_chordal_bipartite(self, certificate=False): (:meth:`~sage.graphs.bipartite_graph.BipartiteGraph.reduced_adjacency_matrix`) of a bipartite graph has no cycle submatrix if and only if the graph is chordal bipartite, where cycle submatrix is 0-1 `n \times n` matrix `n \geq 3` - with exactly two 1's in each row and column and no proper submatrix satsify + with exactly two 1's in each row and column and no proper submatrix satisfy this property. * A doubly lexical ordering diff --git a/src/sage/graphs/matching_covered_graph.py b/src/sage/graphs/matching_covered_graph.py index 8be71a9cd25..1c1d0c263aa 100644 --- a/src/sage/graphs/matching_covered_graph.py +++ b/src/sage/graphs/matching_covered_graph.py @@ -1456,7 +1456,7 @@ def add_edges(self, edges, loops=False): M.add_edges(self.get_matching()) # Check if M is a perfect matching of the resulting graph - if (G.order() != 2*M.size()): + if (G.order() != 2 * M.size()): M = None self.__init__(data=G, matching=M) @@ -1974,7 +1974,7 @@ def delete_vertices(self, vertices): # must be a valid perfect matching of the resulting graph obtained # after the removal of the vertices - if (G.order() != 2*M.size()): + if (G.order() != 2 * M.size()): M = None self.__init__(data=G, matching=M) @@ -2043,7 +2043,7 @@ def maximal_barrier(self, vertex): And in order to find the vertices that do not lie in the maximal barrier containing the provided vertex in linear time we take - inspiration of the `M` alternating tree seach method [LR2004]_. + inspiration of the `M` alternating tree search method [LR2004]_. INPUT: @@ -2825,8 +2825,8 @@ def dfs(x, visited, neighbor_iterator): # Compute the nontrivial tight cut C := ∂(Y) C = [(x, y, w) if x in X else (y, x, w) - for x, y, w in self.edge_iterator(sort_vertices=True) - if (x in X) ^ (y in X)] + for x, y, w in self.edge_iterator(sort_vertices=True) + if (x in X) ^ (y in X)] # Obtain the barrier Z Z = None diff --git a/src/sage/interfaces/khoca.py b/src/sage/interfaces/khoca.py index d21432c6d9f..beae81099af 100644 --- a/src/sage/interfaces/khoca.py +++ b/src/sage/interfaces/khoca.py @@ -1,7 +1,7 @@ r""" Interface to Khoca -Khoca is computer program writen by Lukas Lewark to calculate sl(N)-homology +Khoca is computer program written by Lukas Lewark to calculate sl(N)-homology of knots and links. It calculates the following: * Khovanov sl(2)-homology of arbitrary links, given as a braid or in PD code. diff --git a/src/sage/modules/free_module.py b/src/sage/modules/free_module.py index e22f7460edc..0fd946482af 100644 --- a/src/sage/modules/free_module.py +++ b/src/sage/modules/free_module.py @@ -3175,7 +3175,7 @@ def pseudohom(self, f, twist, codomain=None, side="left"): - ``twist`` -- the twisting morphism or the twisting derivation (if a derivation is given, the corresponding morphism `\theta` - is automatically infered; + is automatically inferred; see also :class:`sage.rings.polynomial.ore_polynomial_ring.OrePolynomialRing`) - ``codomain`` -- (default: ``None``) the codomain of the pseudo diff --git a/src/sage/rings/function_field/function_field_test.py b/src/sage/rings/function_field/function_field_test.py index a5822679c87..3187d8d3e12 100644 --- a/src/sage/rings/function_field/function_field_test.py +++ b/src/sage/rings/function_field/function_field_test.py @@ -73,13 +73,13 @@ def T(F): # https://github.com/pytest-dev/pytest/issues/349 # pairs = [("J", None), - ("K", 16), - ("L", 2), - ("M", 1), - ("N", 1), - ("O", None), - ("T", None), - ("S", 8)] + ("K", 16), + ("L", 2), + ("M", 1), + ("N", 1), + ("O", None), + ("T", None), + ("S", 8)] @pytest.mark.parametrize("ff,max_runs", pairs) @@ -95,7 +95,7 @@ def test_function_field_testsuite(ff, max_runs, request) -> None: The inputs are essentially all fixtures. - ``ff`` -- string; a function field fixture name - - ``max_runs`` -- integer; the maxmimum number of times to + - ``max_runs`` -- integer; the maximum number of times to repeat the test suite - ``request`` -- fixture; a pytest built-in diff --git a/src/sage/rings/polynomial/polydict.pyx b/src/sage/rings/polynomial/polydict.pyx index 7d31fab7d56..32fb483d456 100644 --- a/src/sage/rings/polynomial/polydict.pyx +++ b/src/sage/rings/polynomial/polydict.pyx @@ -98,7 +98,7 @@ cdef class PolyDict: Data structure for multivariate polynomials. A PolyDict holds a dictionary all of whose keys are :class:`ETuple` and - whose values are coefficients on which it is implicitely assumed that + whose values are coefficients on which it is implicitly assumed that arithmetic operations can be performed. No arithmetic operation on :class:`PolyDict` clear zero coefficients as of diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 6b4a8792edc..917dece9552 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -2260,7 +2260,7 @@ cdef class Polynomial(CommutativePolynomial): else: # Compute the trace of T with field of order 2^k # sum T^(2^i) for i in range (degree * k) - # We use repeated squaring to avoid redundent multiplications + # We use repeated squaring to avoid redundant multiplications C, TT = T, T for _ in range(degree * self.base_ring().degree() - 1): TT = TT * TT % self diff --git a/src/sage/schemes/curves/zariski_vankampen.py b/src/sage/schemes/curves/zariski_vankampen.py index f7a7cb28921..148511b4e97 100644 --- a/src/sage/schemes/curves/zariski_vankampen.py +++ b/src/sage/schemes/curves/zariski_vankampen.py @@ -295,7 +295,7 @@ def orient_circuit(circuit, convex=False, precision=53, verbose=False): OUTPUT: The same circuit if it goes counterclockwise, and its reversed otherwise, - given as the ordered list of vertices with identic extremities. + given as the ordered list of vertices with identical extremities. EXAMPLES:: @@ -1036,7 +1036,7 @@ def geometric_basis(G, E, EC0, p, dual_graph, vertical_regions={}) -> list: for i, v in enumerate(cutpath): if i > 0 and v in EC: r = v - cutpath = cutpath[:i+1] + cutpath = cutpath[:i + 1] break qi = EC.index(q) ri = EC.index(r)