diff -up src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx.orig src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx --- src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx 2020-10-30 11:34:21.352987398 -0600 @@ -229,7 +229,7 @@ cdef class FreeAlgebraElement_letterplac return '0' def _latex_(self): - """ + r""" TESTS:: sage: K. = GF(25) diff -up src/sage/algebras/letterplace/free_algebra_letterplace.pyx.orig src/sage/algebras/letterplace/free_algebra_letterplace.pyx --- src/sage/algebras/letterplace/free_algebra_letterplace.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/algebras/letterplace/free_algebra_letterplace.pyx 2020-10-30 11:34:21.353987396 -0600 @@ -605,7 +605,7 @@ cdef class FreeAlgebra_letterplace(Algeb # Auxiliar methods cdef str exponents_to_latex(self, E): - """ + r""" This auxiliary method is used for the representation of elements of this free algebra as a latex string. EXAMPLES:: diff -up src/sage/calculus/functional.py.orig src/sage/calculus/functional.py --- src/sage/calculus/functional.py.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/calculus/functional.py 2020-11-09 12:54:40.527118493 -0700 @@ -54,7 +54,7 @@ def simplify(f): return f def derivative(f, *args, **kwds): - """ + r""" The derivative of `f`. Repeated differentiation is supported by the syntax given in the diff -up src/sage/coding/binary_code.pyx.orig src/sage/coding/binary_code.pyx --- src/sage/coding/binary_code.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/coding/binary_code.pyx 2020-10-30 11:34:21.375987362 -0600 @@ -517,7 +517,7 @@ cdef codeword permute_word_by_wp(WordPer return image def test_expand_to_ortho_basis(B=None): - """ + r""" This function is written in pure C for speed, and is tested from this function. diff -up src/sage/coding/codecan/codecan.pyx.orig src/sage/coding/codecan/codecan.pyx --- src/sage/coding/codecan/codecan.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/coding/codecan/codecan.pyx 2020-10-30 11:34:21.376987361 -0600 @@ -369,7 +369,7 @@ cdef class InnerGroup: return self.transporter def __repr__(self): - """ + r""" EXAMPLES:: sage: from sage.coding.codecan.codecan import InnerGroup @@ -378,7 +378,7 @@ cdef class InnerGroup: frobenius power = 1 and partition = 0 -> 0 1 -> 1 2 -> 2 3 -> 3 4 -> 4 5 -> 5 6 -> 6 7 -> 7 8 -> 8 9 -> 9 """ - return "Subgroup of (GL(k,q) times \GF{q}^n ) rtimes Aut(\GF{q}) " + \ + return r"Subgroup of (GL(k,q) times \GF{q}^n ) rtimes Aut(\GF{q}) " + \ "with rank = %s, frobenius power = %s and partition =%s" % (self.rank, self.frob_pow, OP_string(self.row_partition)) diff -up src/sage/combinat/crystals/letters.pyx.orig src/sage/combinat/crystals/letters.pyx --- src/sage/combinat/crystals/letters.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/combinat/crystals/letters.pyx 2020-10-30 11:34:21.377987359 -0600 @@ -558,7 +558,7 @@ cdef class EmptyLetter(Element): return 'E' def _latex_(self): - """ + r""" Return a latex representation of ``self``. EXAMPLES:: diff -up src/sage/combinat/crystals/tensor_product_element.pyx.orig src/sage/combinat/crystals/tensor_product_element.pyx --- src/sage/combinat/crystals/tensor_product_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/combinat/crystals/tensor_product_element.pyx 2020-10-30 11:34:21.378987358 -0600 @@ -145,8 +145,8 @@ cdef class TensorProductOfCrystalsElemen """ from sage.misc.latex import latex if self._parent.options.convention == "Kashiwara": - return ' \otimes '.join(latex(c) for c in reversed(self)) - return ' \otimes '.join(latex(c) for c in self) + return r' \otimes '.join(latex(c) for c in reversed(self)) + return r' \otimes '.join(latex(c) for c in self) def _ascii_art_(self): """ @@ -1314,7 +1314,7 @@ cdef class CrystalOfBKKTableauxElement(T return repr(self.to_tableau()) def _repr_diagram(self): - """ + r""" Return a string representation of ``self`` as a diagram. EXAMPLES:: diff -up src/sage/functions/prime_pi.pyx.orig src/sage/functions/prime_pi.pyx --- src/sage/functions/prime_pi.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/functions/prime_pi.pyx 2020-10-30 11:34:23.258984488 -0600 @@ -1,4 +1,4 @@ -""" +r""" Counting Primes AUTHORS: diff -up src/sage/graphs/matchpoly.pyx.orig src/sage/graphs/matchpoly.pyx --- src/sage/graphs/matchpoly.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/graphs/matchpoly.pyx 2020-10-30 11:34:23.262984482 -0600 @@ -50,7 +50,7 @@ x = polygen(ZZ, 'x') def matching_polynomial(G, complement=True, name=None): - """ + r""" Computes the matching polynomial of the graph `G`. If `p(G, k)` denotes the number of `k`-matchings (matchings with `k` edges) diff -up src/sage/graphs/strongly_regular_db.pyx.orig src/sage/graphs/strongly_regular_db.pyx --- src/sage/graphs/strongly_regular_db.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/graphs/strongly_regular_db.pyx 2020-10-30 11:34:23.263984480 -0600 @@ -2397,7 +2397,7 @@ def strongly_regular_from_two_intersecti A set of points in the projective geometry `PG(k,q)` is said to be a 2-intersection set if it intersects every hyperplane in either `h_1` or - `h_2` points, where `h_1,h_2\in \\NN`. + `h_2` points, where `h_1,h_2\in \NN`. From a 2-intersection set `S` can be defined a strongly-regular graph in the following way: diff -up src/sage/groups/group.pyx.orig src/sage/groups/group.pyx --- src/sage/groups/group.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/groups/group.pyx 2020-10-30 11:34:23.264984479 -0600 @@ -50,7 +50,7 @@ def is_Group(x): cdef class Group(Parent): - """ + r""" Base class for all groups TESTS:: @@ -189,7 +189,7 @@ cdef class Group(Parent): return self.order() != infinity def is_multiplicative(self): - """ + r""" Returns True if the group operation is given by \* (rather than +). diff -up src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx --- src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx 2020-10-30 11:34:23.265984477 -0600 @@ -913,7 +913,7 @@ cdef class PartitionRefinement_generic: "\\begin{tikzpicture}\n" + "\\tikzset{level distance=3cm, edge from parent/.style=" + "{draw, edge from parent path={(\\tikzparentnode.south) -- (\\tikzchildnode.north)}}}\n" + - "\Tree") + "\\Tree") self._latex_debug_string += "[." self._latex_act_node() diff -up src/sage/groups/perm_gps/partn_ref/data_structures.pyx.orig src/sage/groups/perm_gps/partn_ref/data_structures.pyx --- src/sage/groups/perm_gps/partn_ref/data_structures.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/groups/perm_gps/partn_ref/data_structures.pyx 2020-10-30 11:34:23.266984476 -0600 @@ -828,11 +828,11 @@ cdef SC_print_level(StabilizerChain *SC, print('| labels {}'.format([SC.labels [level][i] for i from 0 <= i < n])) print('|') print('| generators {}'.format([[SC.generators [level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]])) - print('\ inverses {}'.format([[SC.gen_inverses[level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]])) + print('\\ inverses {}'.format([[SC.gen_inverses[level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]])) else: print('/ level {}'.format(level)) print('|') - print('\ base_size {}'.format(SC.base_size)) + print('\\ base_size {}'.format(SC.base_size)) cdef StabilizerChain *SC_new_base(StabilizerChain *SC, int *base, int base_len): """ diff -up src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx.orig src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx --- src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx 2020-10-30 11:34:23.266984476 -0600 @@ -105,7 +105,7 @@ cdef class LinearBinaryCodeStruct(Binary self.ith_word = &ith_word_linear def run(self, partition=None): - """ + r""" Perform the canonical labeling and automorphism group computation, storing results to self. @@ -607,7 +607,7 @@ cdef int ith_word_nonlinear(BinaryCodeSt return 0 cdef int refine_by_bip_degree(PartitionStack *col_ps, void *S, int *cells_to_refine_by, int ctrb_len): - """ + r""" Refines the input partition by checking degrees of vertices to the given cells in the associated bipartite graph (vertices split into columns and words). @@ -731,7 +731,7 @@ cdef int refine_by_bip_degree(PartitionS return invariant cdef int compare_linear_codes(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree): - """ + r""" Compare gamma_1(S1) and gamma_2(S2). Return return -1 if gamma_1(S1) < gamma_2(S2), 0 if gamma_1(S1) == gamma_2(S2), @@ -804,7 +804,7 @@ cdef int compare_linear_codes(int *gamma return 0 cdef int compare_nonlinear_codes(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree): - """ + r""" Compare gamma_1(S1) and gamma_2(S2). Return return -1 if gamma_1(S1) < gamma_2(S2), 0 if gamma_1(S1) == gamma_2(S2), diff -up src/sage/groups/perm_gps/permgroup_element.pyx.orig src/sage/groups/perm_gps/permgroup_element.pyx --- src/sage/groups/perm_gps/permgroup_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/groups/perm_gps/permgroup_element.pyx 2020-10-30 11:45:08.560999486 -0600 @@ -1176,7 +1176,7 @@ cdef class PermutationGroupElement(Multi return result cpdef _act_on_(self, x, bint self_on_left): - """ + r""" Return the result of the action of ``self`` on ``x``. For example, if ``x=f(z)`` is a polynomial, then this function returns @@ -1620,7 +1620,7 @@ cdef class PermutationGroupElement(Multi return ~self def sign(self): - """ + r""" Returns the sign of self, which is `(-1)^{s}`, where `s` is the number of swaps. diff -up src/sage/libs/eclib/newforms.pyx.orig src/sage/libs/eclib/newforms.pyx --- src/sage/libs/eclib/newforms.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/eclib/newforms.pyx 2020-10-30 11:34:23.270984470 -0600 @@ -22,7 +22,7 @@ from sage.modular.all import Cusp cdef class ECModularSymbol: - """ + r""" Modular symbol associated with an elliptic curve, using John Cremona's newforms class. EXAMPLES:: diff -up src/sage/libs/fes.pyx.orig src/sage/libs/fes.pyx --- src/sage/libs/fes.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/fes.pyx 2020-10-30 11:34:23.271984468 -0600 @@ -291,7 +291,7 @@ def find_coordinate_change(As, max_tries def prepare_polynomials(f): - """ + r""" Finds a linear combination of the equations that is faster to solve by FES INPUT: diff -up src/sage/libs/ntl/ntl_GF2E.pyx.orig src/sage/libs/ntl/ntl_GF2E.pyx --- src/sage/libs/ntl/ntl_GF2E.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/ntl/ntl_GF2E.pyx 2020-10-30 11:34:23.274984464 -0600 @@ -69,7 +69,7 @@ def ntl_GF2E_random(ntl_GF2EContext_clas cdef class ntl_GF2E(object): r""" - The \\class{GF2E} represents a finite extension field over GF(2) + The \class{GF2E} represents a finite extension field over GF(2) using NTL. Elements are represented as polynomials over GF(2) modulo a modulus. @@ -435,7 +435,7 @@ cdef class ntl_GF2E(object): return l def _sage_(ntl_GF2E self, k=None): - """ + r""" Returns a \class{FiniteFieldElement} representation of this element. If a \class{FiniteField} k is provided it is constructed in this field if possible. A \class{FiniteField} diff -up src/sage/libs/ntl/ntl_GF2X.pyx.orig src/sage/libs/ntl/ntl_GF2X.pyx --- src/sage/libs/ntl/ntl_GF2X.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/ntl/ntl_GF2X.pyx 2020-10-30 11:34:23.275984462 -0600 @@ -480,7 +480,7 @@ cdef class ntl_GF2X(object): return [self[i] for i in range(GF2X_deg(self.x)+1)] def bin(ntl_GF2X self): - """ + r""" Returns binary representation of this element. It is the same as setting \code{ntl.GF2XHexOutput(False)} and representing this element afterwards. However it should be @@ -503,7 +503,7 @@ cdef class ntl_GF2X(object): return s def hex(ntl_GF2X self): - """ + r""" Return an hexadecimal representation of this element. It is the same as setting \code{ntl.GF2XHexOutput(True)} and diff -up src/sage/libs/ntl/ntl_mat_GF2E.pyx.orig src/sage/libs/ntl/ntl_mat_GF2E.pyx --- src/sage/libs/ntl/ntl_mat_GF2E.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/ntl/ntl_mat_GF2E.pyx 2020-10-30 11:34:23.276984461 -0600 @@ -177,7 +177,7 @@ cdef class ntl_mat_GF2E(object): return unpickle_class_args, (ntl_mat_GF2E, (self.modulus_context(), self.x.NumRows(), self.x.NumCols(), self.list())) def __repr__(self): - """ + r""" Return the string representation of self. EXAMPLES:: @@ -442,7 +442,7 @@ cdef class ntl_mat_GF2E(object): return r def gauss(self,ncols=-1): - """ + r""" Performs unitary row operations so as to bring this matrix into row echelon form. If the optional argument \code{ncols} is supplied, stops when first ncols columns are in echelon diff -up src/sage/libs/ntl/ntl_mat_GF2.pyx.orig src/sage/libs/ntl/ntl_mat_GF2.pyx --- src/sage/libs/ntl/ntl_mat_GF2.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/ntl/ntl_mat_GF2.pyx 2020-10-30 11:46:11.151903948 -0600 @@ -1,7 +1,7 @@ # distutils: libraries = ntl gmp m # distutils: language = c++ -""" +r""" Matrices over the $\GF{2}$ via NTL This class is only provided to have a complete NTL interface and for @@ -432,7 +432,7 @@ cdef class ntl_mat_GF2(object): return r def gauss(self,ncols=-1): - """ + r""" Performs unitary row operations so as to bring this matrix into row echelon form (not reduced!). If the optional argument \code{ncols} is supplied, stops when first ncols @@ -601,7 +601,7 @@ cdef class ntl_mat_GF2(object): return r def __invert__(self): - """ + r""" Return $X = A^{-1}$; an error is raised if A is singular. EXAMPLES:: diff -up src/sage/libs/ntl/ntl_mat_ZZ.pyx.orig src/sage/libs/ntl/ntl_mat_ZZ.pyx --- src/sage/libs/ntl/ntl_mat_ZZ.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/ntl/ntl_mat_ZZ.pyx 2020-10-30 11:34:23.277984459 -0600 @@ -69,7 +69,7 @@ cdef class ntl_mat_ZZ(object): The \class{mat_ZZ} class implements arithmetic with matrices over $\Z$. """ def __init__(self, nrows=0, ncols=0, v=None): - """ + r""" The \class{mat_ZZ} class implements arithmetic with matrices over $\Z$. EXAMPLES:: @@ -125,7 +125,7 @@ cdef class ntl_mat_ZZ(object): return unpickle_class_args, (ntl_mat_ZZ, (self.__nrows, self.__ncols, self.list())) def __repr__(self): - """ + r""" Return the string representation of self. EXAMPLES:: diff -up src/sage/libs/ntl/ntl_ZZ_pEX.pyx.orig src/sage/libs/ntl/ntl_ZZ_pEX.pyx --- src/sage/libs/ntl/ntl_ZZ_pEX.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/ntl/ntl_ZZ_pEX.pyx 2020-10-30 15:12:50.715238326 -0600 @@ -1,7 +1,7 @@ # distutils: libraries = ntl gmp m # distutils: language = c++ -""" +r""" Wrapper for NTL's polynomials over finite ring extensions of $\Z / p\Z.$ AUTHORS: diff -up src/sage/libs/ntl/ntl_ZZX.pyx.orig src/sage/libs/ntl/ntl_ZZX.pyx --- src/sage/libs/ntl/ntl_ZZX.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/ntl/ntl_ZZX.pyx 2020-10-30 11:34:23.279984456 -0600 @@ -688,7 +688,7 @@ cdef class ntl_ZZX(object): return (self*other).quo_rem(g)[0] def xgcd(self, ntl_ZZX other, proof=None): - """ + r""" If self and other are coprime over the rationals, return r, s, t such that r = s*self + t*other. Otherwise return 0. This is \emph{not} the same as the \sage function on polynomials diff -up src/sage/libs/pynac/pynac.pyx.orig src/sage/libs/pynac/pynac.pyx --- src/sage/libs/pynac/pynac.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/pynac/pynac.pyx 2020-10-30 11:34:26.009980290 -0600 @@ -385,7 +385,7 @@ cdef stdstring* string_from_pystr(py_str return new stdstring(s) cdef stdstring* py_latex_variable(var_name): - """ + r""" Returns a c++ string containing the latex representation of the given variable name. @@ -414,7 +414,7 @@ cdef stdstring* py_latex_variable(var_na return string_from_pystr(py_vlatex) def py_latex_variable_for_doctests(x): - """ + r""" Internal function used so we can doctest a certain cdef'd method. EXAMPLES:: @@ -703,7 +703,7 @@ cdef stdstring* py_latex_fderivative(uns operator_string=r"\frac{\partial^{%s}}{%s}"%(len(params),''.join(diff_args)) py_res = operator_string+py_latex_function_pystring(id,args,False) else: - ostr = ''.join(['\mathrm{D}_{',', '.join([repr(int(x)) for x in params]), '}']) + ostr = ''.join([r'\mathrm{D}_{',', '.join([repr(int(x)) for x in params]), '}']) fstr = py_latex_function_pystring(id, args, True) py_res = ostr + fstr return string_from_pystr(py_res) diff -up src/sage/libs/singular/polynomial.pyx.orig src/sage/libs/singular/polynomial.pyx --- src/sage/libs/singular/polynomial.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/singular/polynomial.pyx 2020-10-30 11:34:26.010980289 -0600 @@ -22,7 +22,7 @@ cdef extern from *: # hack to get at cyt int unlikely(int) import re -plusminus_pattern = re.compile("([^\(^])([\+\-])") +plusminus_pattern = re.compile(r"([^\(^])([\+\-])") from sage.cpython.string cimport bytes_to_str, str_to_bytes diff -up src/sage/libs/symmetrica/sc.pxi.orig src/sage/libs/symmetrica/sc.pxi --- src/sage/libs/symmetrica/sc.pxi.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/libs/symmetrica/sc.pxi 2020-10-30 11:34:26.011980287 -0600 @@ -103,7 +103,7 @@ def charvalue_symmetrica(irred, cls, tab def kranztafel_symmetrica(a, b): - """ + r""" you enter the INTEGER objects, say a and b, and res becomes a MATRIX object, the charactertable of S_b \wr S_a, co becomes a VECTOR object of classorders and cl becomes a VECTOR object of diff -up src/sage/matrix/matrix0.pyx.orig src/sage/matrix/matrix0.pyx --- src/sage/matrix/matrix0.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/matrix/matrix0.pyx 2020-10-30 11:34:26.013980284 -0600 @@ -2241,7 +2241,7 @@ cdef class Matrix(sage.structure.element # Functions ################################################### def act_on_polynomial(self, f): - """ + r""" Returns the polynomial f(self\*x). INPUT: @@ -2307,7 +2307,7 @@ cdef class Matrix(sage.structure.element # Arithmetic ################################################### def commutator(self, other): - """ + r""" Return the commutator self\*other - other\*self. EXAMPLES:: @@ -4767,7 +4767,7 @@ cdef class Matrix(sage.structure.element # Arithmetic ################################################### cdef _vector_times_matrix_(self, Vector v): - """ + r""" Returns the vector times matrix product. INPUT: diff -up src/sage/matrix/matrix2.pyx.orig src/sage/matrix/matrix2.pyx --- src/sage/matrix/matrix2.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/matrix/matrix2.pyx 2020-10-30 11:34:26.019980275 -0600 @@ -9446,7 +9446,7 @@ cdef class Matrix(Matrix1): return img def density(self): - """ + r""" Return the density of the matrix. By density we understand the ratio of the number of nonzero diff -up src/sage/matrix/matrix_integer_dense.pyx.orig src/sage/matrix/matrix_integer_dense.pyx --- src/sage/matrix/matrix_integer_dense.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/matrix/matrix_integer_dense.pyx 2020-10-30 11:52:49.737274785 -0600 @@ -745,7 +745,7 @@ cdef class Matrix_integer_dense(Matrix_d return ans def _multiply_classical(self, Matrix_integer_dense right): - """ + r""" EXAMPLES:: sage: n = 3 diff -up src/sage/matrix/matrix_modn_dense_template.pxi.orig src/sage/matrix/matrix_modn_dense_template.pxi --- src/sage/matrix/matrix_modn_dense_template.pxi.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/matrix/matrix_modn_dense_template.pxi 2020-10-30 11:34:26.028980261 -0600 @@ -664,7 +664,7 @@ cdef class Matrix_modn_dense_template(Ma return (word_size, little_endian, s), 10 def _unpickle(self, data, int version): - """ + r""" TESTS: Test for char-sized modulus:: @@ -2526,7 +2526,7 @@ cdef class Matrix_modn_dense_template(Ma return Matrix_dense.determinant(self) cdef xgcd_eliminate(self, celement * row1, celement* row2, Py_ssize_t start_col): - """ + r""" Reduces ``row1`` and ``row2`` by a unimodular transformation using the xgcd relation between their first coefficients ``a`` and ``b``. diff -up src/sage/matrix/matrix_polynomial_dense.pyx.orig src/sage/matrix/matrix_polynomial_dense.pyx --- src/sage/matrix/matrix_polynomial_dense.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/matrix/matrix_polynomial_dense.pyx 2020-10-30 11:34:26.030980258 -0600 @@ -44,16 +44,16 @@ cdef class Matrix_polynomial_dense(Matri commonly used in the literature. - Working column-wise: each column of the matrix is a vector in the basis; - then, a $\\Bold{K}[x]$-submodule of $\\Bold{K}[x]^{m}$ of rank $n$ is - represented by an $m \\times n$ matrix, whose columns span the module - (via $\\Bold{K}[x]$-linear combinations). This matrix has full rank, - and $n \\leq m$. + then, a $\Bold{K}[x]$-submodule of $\Bold{K}[x]^{m}$ of rank $n$ is + represented by an $m \times n$ matrix, whose columns span the module + (via $\Bold{K}[x]$-linear combinations). This matrix has full rank, + and $n \leq m$. - Working row-wise: each row of the matrix is a vector in the basis; then, - a $\\Bold{K}[x]$-submodule of $\\Bold{K}[x]^{n}$ of rank $m$ is - represented by an $m \\times n$ matrix, whose rows span the module (via - $\\Bold{K}[x]$-linear combinations). This matrix has full rank, and $m - \\leq n$. + a $\Bold{K}[x]$-submodule of $\Bold{K}[x]^{n}$ of rank $m$ is + represented by an $m \times n$ matrix, whose rows span the module (via + $\Bold{K}[x]$-linear combinations). This matrix has full rank, and $m + \leq n$. For the rest of this class description, we assume that one is working row-wise. For a given such module, all its bases are equivalent under diff -up src/sage/matrix/matrix_rational_dense.pyx.orig src/sage/matrix/matrix_rational_dense.pyx --- src/sage/matrix/matrix_rational_dense.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/matrix/matrix_rational_dense.pyx 2020-10-30 11:34:26.031980257 -0600 @@ -506,7 +506,7 @@ cdef class Matrix_rational_dense(Matrix_ return rich_to_bool(op, 0) cdef _vector_times_matrix_(self, Vector v): - """ + r""" Returns the vector times matrix product. INPUT: @@ -919,7 +919,7 @@ cdef class Matrix_rational_dense(Matrix_ return 0 def _clear_denom(self): - """ + r""" INPUT: @@ -1186,7 +1186,7 @@ cdef class Matrix_rational_dense(Matrix_ return ans def _multiply_over_integers(self, Matrix_rational_dense right, algorithm='default'): - """ + r""" Multiply this matrix by right using a multimodular algorithm and return the result. diff -up src/sage/matroids/basis_exchange_matroid.pyx.orig src/sage/matroids/basis_exchange_matroid.pyx --- src/sage/matroids/basis_exchange_matroid.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/matroids/basis_exchange_matroid.pyx 2020-10-30 11:34:26.033980254 -0600 @@ -2115,7 +2115,7 @@ cdef class BasisExchangeMatroid(Matroid) return EQ[0] cpdef _is_isomorphism(self, other, morphism): - """ + r""" Version of is_isomorphism() that does no type checking. INPUT: diff -up src/sage/matroids/linear_matroid.pyx.orig src/sage/matroids/linear_matroid.pyx --- src/sage/matroids/linear_matroid.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/matroids/linear_matroid.pyx 2020-10-30 11:34:26.038980246 -0600 @@ -796,7 +796,7 @@ cdef class LinearMatroid(BasisExchangeMa # (field) isomorphism cpdef bint _is_field_isomorphism(self, LinearMatroid other, morphism): # not safe if self == other - """ + r""" Version of :meth:`` that does no type checking. @@ -962,7 +962,7 @@ cdef class LinearMatroid(BasisExchangeMa return self._is_field_isomorphism(other, morphism) cpdef is_field_isomorphism(self, other, morphism): - """ + r""" Test if a provided morphism induces a bijection between represented matroids. diff -up src/sage/matroids/matroid.pyx.orig src/sage/matroids/matroid.pyx --- src/sage/matroids/matroid.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/matroids/matroid.pyx 2020-10-30 11:34:26.040980243 -0600 @@ -3079,7 +3079,7 @@ cdef class Matroid(SageObject): return Polyhedron(vertices) def independence_matroid_polytope(self): - """ + r""" Return the independence matroid polytope of ``self``. This is defined as the convex hull of the vertices @@ -3359,7 +3359,7 @@ cdef class Matroid(SageObject): return self._is_isomorphism(other, morphism) cpdef is_isomorphism(self, other, morphism): - """ + r""" Test if a provided morphism induces a matroid isomorphism. A *morphism* is a map from the groundset of ``self`` to the groundset @@ -3482,7 +3482,7 @@ cdef class Matroid(SageObject): return self._is_isomorphism(other, mf) cpdef _is_isomorphism(self, other, morphism): - """ + r""" Version of is_isomorphism() that does no type checking. INPUT: @@ -4246,7 +4246,7 @@ cdef class Matroid(SageObject): return self.dual().extension(element, subsets).dual() cpdef modular_cut(self, subsets): - """ + r""" Compute the modular cut generated by ``subsets``. A *modular cut* is a collection `C` of flats such that @@ -4647,7 +4647,7 @@ cdef class Matroid(SageObject): return True cpdef is_cosimple(self): - """ + r""" Test if the matroid is cosimple. A matroid is *cosimple* if it contains no cocircuits of length 1 or 2. @@ -7416,7 +7416,7 @@ cdef class Matroid(SageObject): return A cpdef tutte_polynomial(self, x=None, y=None): - """ + r""" Return the Tutte polynomial of the matroid. The *Tutte polynomial* of a matroid is the polynomial diff -up src/sage/misc/cachefunc.pyx.orig src/sage/misc/cachefunc.pyx --- src/sage/misc/cachefunc.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/misc/cachefunc.pyx 2020-10-30 11:34:26.042980240 -0600 @@ -835,7 +835,7 @@ cdef class CachedFunction(object): ## forward other questions to the cached function. def _instancedoc_(self): - """ + r""" Provide documentation for the cached function. A cached function shall inherit the documentation diff -up src/sage/misc/sageinspect.py.orig src/sage/misc/sageinspect.py --- src/sage/misc/sageinspect.py.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/misc/sageinspect.py 2020-11-01 10:38:08.203022437 -0700 @@ -844,7 +844,7 @@ class SageArgSpecVisitor(ast.NodeVisitor return -self.visit(node.operand) def _grep_first_pair_of_parentheses(s): - """ + r""" Return the first matching pair of parentheses in a code string. INPUT: @@ -899,7 +899,7 @@ def _grep_first_pair_of_parentheses(s): raise SyntaxError("The given string does not contain balanced parentheses") def _split_syntactical_unit(s): - """ + r""" Split off a sub-expression from the start of a given string. INPUT: diff -up src/sage/modular/arithgroup/arithgroup_element.pyx.orig src/sage/modular/arithgroup/arithgroup_element.pyx --- src/sage/modular/arithgroup/arithgroup_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/modular/arithgroup/arithgroup_element.pyx 2020-10-30 11:34:26.042980240 -0600 @@ -194,7 +194,7 @@ cdef class ArithmeticSubgroupElement(Mul return richcmp(self.__x, right.__x, op) def __nonzero__(self): - """ + r""" Return ``True``, since the ``self`` lives in SL(2,\Z), which does not contain the zero matrix. diff -up src/sage/modular/arithgroup/farey_symbol.pyx.orig src/sage/modular/arithgroup/farey_symbol.pyx --- src/sage/modular/arithgroup/farey_symbol.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/modular/arithgroup/farey_symbol.pyx 2020-10-30 11:34:26.043980238 -0600 @@ -617,7 +617,7 @@ cdef class Farey: (forced_format is None and '\\xymatrix' in latex.mathjax_avoid_list()): # output not using xymatrix s = r'\left( -\infty' - a = [x._latex_() for x in self.fractions()] + ['\infty'] + a = [x._latex_() for x in self.fractions()] + [r'\infty'] b = self.pairings() for i in xrange(len(a)): u = b[i] diff -up src/sage/modular/modsym/heilbronn.pyx.orig src/sage/modular/modsym/heilbronn.pyx --- src/sage/modular/modsym/heilbronn.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/modular/modsym/heilbronn.pyx 2020-10-30 11:34:26.043980238 -0600 @@ -211,7 +211,7 @@ cdef class Heilbronn: sig_off() cdef apply_to_polypart(self, fmpz_poly_t* ans, int i, int k): - """ + r""" INPUT: - ``ans`` - fmpz_poly_t\*; pre-allocated an diff -up src/sage/modules/free_module_element.pyx.orig src/sage/modules/free_module_element.pyx --- src/sage/modules/free_module_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/modules/free_module_element.pyx 2020-10-30 11:34:26.045980235 -0600 @@ -2345,7 +2345,7 @@ cdef class FreeModuleElement(Vector): def plot_step(self, xmin=0, xmax=1, eps=None, res=None, connect=True, **kwds): - """ + r""" INPUT: - ``xmin`` - (default: 0) start x position to start @@ -3615,7 +3615,7 @@ cdef class FreeModuleElement(Vector): from sage.misc.latex import latex vector_delimiters = latex.vector_delimiters() s = '\\left' + vector_delimiters[0] - s += ',\,'.join([latex(a) for a in self.list()]) + s += ',\\,'.join([latex(a) for a in self.list()]) return s + '\\right' + vector_delimiters[1] def dense_vector(self): diff -up src/sage/numerical/backends/generic_backend.pyx.orig src/sage/numerical/backends/generic_backend.pyx --- src/sage/numerical/backends/generic_backend.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/numerical/backends/generic_backend.pyx 2020-10-30 11:34:26.046980234 -0600 @@ -1370,7 +1370,7 @@ cdef class GenericBackend: raise NotImplementedError() cpdef bint is_variable_basic(self, int index): - """ + r""" Test whether the given variable is basic. This assumes that the problem has been solved with the simplex method @@ -1400,7 +1400,7 @@ cdef class GenericBackend: raise NotImplementedError() cpdef bint is_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method @@ -1430,7 +1430,7 @@ cdef class GenericBackend: raise NotImplementedError() cpdef bint is_slack_variable_basic(self, int index): - """ + r""" Test whether the slack variable of the given row is basic. This assumes that the problem has been solved with the simplex method @@ -1460,7 +1460,7 @@ cdef class GenericBackend: raise NotImplementedError() cpdef bint is_slack_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method diff -up src/sage/numerical/backends/glpk_backend.pyx.orig src/sage/numerical/backends/glpk_backend.pyx --- src/sage/numerical/backends/glpk_backend.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/numerical/backends/glpk_backend.pyx 2020-10-30 11:34:26.047980232 -0600 @@ -2327,7 +2327,7 @@ cdef class GLPKBackend(GenericBackend): cpdef bint is_variable_basic(self, int index): - """ + r""" Test whether the given variable is basic. This assumes that the problem has been solved with the simplex method @@ -2358,7 +2358,7 @@ cdef class GLPKBackend(GenericBackend): return self.get_col_stat(index) == GLP_BS cpdef bint is_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method and a basis is available. Otherwise an exception will be raised. @@ -2388,7 +2388,7 @@ cdef class GLPKBackend(GenericBackend): return self.get_col_stat(index) == GLP_NL cpdef bint is_slack_variable_basic(self, int index): - """ + r""" Test whether the slack variable of the given row is basic. This assumes that the problem has been solved with the simplex method @@ -2419,7 +2419,7 @@ cdef class GLPKBackend(GenericBackend): return self.get_row_stat(index) == GLP_BS cpdef bint is_slack_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the slack variable of the given row is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method diff -up src/sage/numerical/backends/interactivelp_backend.pyx.orig src/sage/numerical/backends/interactivelp_backend.pyx --- src/sage/numerical/backends/interactivelp_backend.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/numerical/backends/interactivelp_backend.pyx 2020-10-30 11:34:26.047980232 -0600 @@ -1071,7 +1071,7 @@ cdef class InteractiveLPBackend: problem_type, ring, objective_constant_term=d) cpdef bint is_variable_basic(self, int index): - """ + r""" Test whether the given variable is basic. This assumes that the problem has been solved with the simplex method @@ -1101,7 +1101,7 @@ cdef class InteractiveLPBackend: return self.lp_std_form.decision_variables()[index] in self.final_dictionary.basic_variables() cpdef bint is_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method @@ -1131,7 +1131,7 @@ cdef class InteractiveLPBackend: return self.lp_std_form.decision_variables()[index] in self.final_dictionary.nonbasic_variables() cpdef bint is_slack_variable_basic(self, int index): - """ + r""" Test whether the slack variable of the given row is basic. This assumes that the problem has been solved with the simplex method @@ -1161,7 +1161,7 @@ cdef class InteractiveLPBackend: return self.lp_std_form.slack_variables()[index] in self.final_dictionary.basic_variables() cpdef bint is_slack_variable_nonbasic_at_lower_bound(self, int index): - """ + r""" Test whether the given variable is nonbasic at lower bound. This assumes that the problem has been solved with the simplex method @@ -1193,7 +1193,7 @@ cdef class InteractiveLPBackend: cpdef dictionary(self): # Proposed addition to the general interface, # which would for other solvers return backend dictionaries (#18804) - """ + r""" Return a dictionary representing the current basis. EXAMPLES:: @@ -1228,7 +1228,7 @@ cdef class InteractiveLPBackend: cpdef interactive_lp_problem(self): - """ + r""" Return the :class:`InteractiveLPProblem` object associated with this backend. EXAMPLES:: diff -up src/sage/quivers/algebra_elements.pyx.orig src/sage/quivers/algebra_elements.pyx --- src/sage/quivers/algebra_elements.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/quivers/algebra_elements.pyx 2020-10-30 11:34:26.048980231 -0600 @@ -280,7 +280,7 @@ cdef class PathAlgebraElement(RingElemen ) def _latex_(self): - """ + r""" Latex string representation. EXAMPLES:: diff -up src/sage/rings/bernoulli_mod_p.pyx.orig src/sage/rings/bernoulli_mod_p.pyx --- src/sage/rings/bernoulli_mod_p.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/bernoulli_mod_p.pyx 2020-10-30 11:34:26.048980231 -0600 @@ -37,7 +37,7 @@ from sage.rings.bernmm import bernmm_ber def verify_bernoulli_mod_p(data): - """ + r""" Computes checksum for Bernoulli numbers. It checks the identity diff -up src/sage/rings/complex_interval.pyx.orig src/sage/rings/complex_interval.pyx --- src/sage/rings/complex_interval.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/complex_interval.pyx 2020-10-30 11:34:26.050980228 -0600 @@ -729,7 +729,7 @@ cdef class ComplexIntervalFieldElement(s return x def norm(self): - """ + r""" Return the norm of this complex number. If `c = a + bi` is a complex number, then the norm of `c` is defined as @@ -1111,7 +1111,7 @@ cdef class ComplexIntervalFieldElement(s return x def __invert__(self): - """ + r""" Return the multiplicative inverse of ``self``. EXAMPLES:: diff -up src/sage/rings/complex_mpc.pyx.orig src/sage/rings/complex_mpc.pyx --- src/sage/rings/complex_mpc.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/complex_mpc.pyx 2020-10-30 11:34:26.051980226 -0600 @@ -150,15 +150,15 @@ cdef inline mpfr_rnd_t rnd_im(mpc_rnd_t sign = '[+-]' digit_ten = '[0123456789]' exponent_ten = '[e@]' + sign + '?[0123456789]+' -number_ten = 'inf(?:inity)?|@inf@|nan(?:\([0-9A-Z_]*\))?|@nan@(?:\([0-9A-Z_]*\))?'\ - '|(?:' + digit_ten + '*\.' + digit_ten + '+|' + digit_ten + '+\.?)(?:' + exponent_ten + ')?' -imaginary_ten = 'i(?:\s*\*\s*(?:' + number_ten + '))?|(?:' + number_ten + ')\s*\*\s*i' -complex_ten = '(?P(?P' + sign + ')?\s*(?P' + imaginary_ten + ')' \ - '(\s*(?P' + sign + ')\s*(?P' + number_ten + '))?)' \ +number_ten = r'inf(?:inity)?|@inf@|nan(?:\([0-9A-Z_]*\))?|@nan@(?:\([0-9A-Z_]*\))?'\ + '|(?:' + digit_ten + r'*\.' + digit_ten + '+|' + digit_ten + r'+\.?)(?:' + exponent_ten + ')?' +imaginary_ten = r'i(?:\s*\*\s*(?:' + number_ten + '))?|(?:' + number_ten + r')\s*\*\s*i' +complex_ten = '(?P(?P' + sign + r')?\s*(?P' + imaginary_ten + ')' \ + r'(\s*(?P' + sign + r')\s*(?P' + number_ten + '))?)' \ '|' \ - '(?P(?P' + sign + ')?\s*(?P' + number_ten + ')' \ - '(\s*(?P' + sign + ')\s*(?P' + imaginary_ten + '))?)' -re_complex_ten = re.compile('^\s*(?:' + complex_ten + ')\s*$', re.I) + '(?P(?P' + sign + r')?\s*(?P' + number_ten + ')' \ + r'(\s*(?P' + sign + r')\s*(?P' + imaginary_ten + '))?)' +re_complex_ten = re.compile(r'^\s*(?:' + complex_ten + r')\s*$', re.I) cpdef inline split_complex_string(string, int base=10): """ @@ -198,17 +198,17 @@ cpdef inline split_complex_string(string # Warning: number, imaginary, and complex should be enclosed in parentheses # when used as regexp because of alternatives '|' - number = '@nan@(?:\([0-9A-Z_]*\))?|@inf@|(?:' + digit + '*\.' + digit + '+|' + digit + '+\.?)(?:' + exponent + ')?' + number = r'@nan@(?:\([0-9A-Z_]*\))?|@inf@|(?:' + digit + r'*\.' + digit + '+|' + digit + r'+\.?)(?:' + exponent + ')?' if base <= 10: - number = 'nan(?:\([0-9A-Z_]*\))?|inf(?:inity)?|' + number - imaginary = 'i(?:\s*\*\s*(?:' + number + '))?|(?:' + number + ')\s*\*\s*i' - complex = '(?P(?P' + sign + ')?\s*(?P' + imaginary + ')' \ - '(\s*(?P' + sign + ')\s*(?P' + number + '))?)' \ + number = r'nan(?:\([0-9A-Z_]*\))?|inf(?:inity)?|' + number + imaginary = r'i(?:\s*\*\s*(?:' + number + '))?|(?:' + number + r')\s*\*\s*i' + complex = '(?P(?P' + sign + r')?\s*(?P' + imaginary + ')' \ + r'(\s*(?P' + sign + r')\s*(?P' + number + '))?)' \ '|' \ - '(?P(?P' + sign + ')?\s*(?P' + number + ')' \ - '(\s*(?P' + sign + ')\s*(?P' + imaginary + '))?)' + '(?P(?P' + sign + r')?\s*(?P' + number + ')' \ + r'(\s*(?P' + sign + r')\s*(?P' + imaginary + '))?)' - z = re.match('^\s*(?:' + complex + ')\s*$', string, re.I) + z = re.match(r'^\s*(?:' + complex + r')\s*$', string, re.I) x, y = None, None if z is not None: @@ -220,18 +220,18 @@ cpdef inline split_complex_string(string return None if z.group(prefix + '_re_abs') is not None: - x = z.expand('\g<' + prefix + '_re_abs>') + x = z.expand(r'\g<' + prefix + '_re_abs>') if z.group(prefix + '_re_sign') is not None: - x = z.expand('\g<' + prefix + '_re_sign>') + x + x = z.expand(r'\g<' + prefix + '_re_sign>') + x if z.group(prefix + '_im_abs') is not None: - y = re.search('(?P' + number + ')', z.expand('\g<' + prefix + '_im_abs>'), re.I) + y = re.search('(?P' + number + ')', z.expand(r'\g<' + prefix + '_im_abs>'), re.I) if y is None: y = '1' else: - y = y.expand('\g') + y = y.expand(r'\g') if z.group(prefix + '_im_sign') is not None: - y = z.expand('\g<' + prefix + '_im_sign>') + y + y = z.expand(r'\g<' + prefix + '_im_sign>') + y return x, y @@ -1704,7 +1704,7 @@ cdef class MPComplexNumber(sage.structur return z def cosh(self): - """ + r""" Return the hyperbolic cosine of this complex number: .. MATH:: @@ -1724,7 +1724,7 @@ cdef class MPComplexNumber(sage.structur return z def sinh(self): - """ + r""" Return the hyperbolic sine of this complex number: .. MATH:: @@ -2066,7 +2066,7 @@ cdef class MPComplexNumber(sage.structur return z def exp(self): - """ + r""" Return the exponential of this complex number: .. MATH:: diff -up src/sage/rings/finite_rings/hom_finite_field.pyx.orig src/sage/rings/finite_rings/hom_finite_field.pyx --- src/sage/rings/finite_rings/hom_finite_field.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/finite_rings/hom_finite_field.pyx 2020-10-30 11:34:26.053980223 -0600 @@ -147,7 +147,7 @@ cdef class SectionFiniteFieldHomomorphis def _repr_(self): - """ + r""" Return a string representation of this section. EXAMPLES:: diff -up src/sage/rings/finite_rings/integer_mod.pyx.orig src/sage/rings/finite_rings/integer_mod.pyx --- src/sage/rings/finite_rings/integer_mod.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/finite_rings/integer_mod.pyx 2020-10-30 11:34:26.053980223 -0600 @@ -2177,7 +2177,7 @@ cdef class IntegerMod_gmp(IntegerMod_abs return int(self.lift()) def __pow__(IntegerMod_gmp self, exp, m): # NOTE: m ignored, always use modulus of parent ring - """ + r""" EXAMPLES:: sage: R = Integers(10^10) @@ -3434,7 +3434,7 @@ cdef class IntegerMod_int64(IntegerMod_a return self._new_c(self.ivalue >> (-k)) def __pow__(IntegerMod_int64 self, exp, m): # NOTE: m ignored, always use modulus of parent ring - """ + r""" EXAMPLES:: sage: R = Integers(10) diff -up src/sage/rings/function_field/element.pyx.orig src/sage/rings/function_field/element.pyx --- src/sage/rings/function_field/element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/function_field/element.pyx 2020-10-30 11:34:26.054980222 -0600 @@ -148,7 +148,7 @@ cdef class FunctionFieldElement(FieldEle raise NotImplementedError("PARI does not support general function field elements.") def _latex_(self): - """ + r""" EXAMPLES:: sage: K. = FunctionField(QQ) diff -up src/sage/rings/number_field/number_field_element.pyx.orig src/sage/rings/number_field/number_field_element.pyx --- src/sage/rings/number_field/number_field_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/number_field/number_field_element.pyx 2020-10-30 11:34:26.056980219 -0600 @@ -487,7 +487,7 @@ cdef class NumberFieldElement(FieldEleme return codomain(f(im_gens[0])) def _latex_(self): - """ + r""" Returns the latex representation for this element. EXAMPLES:: diff -up src/sage/rings/number_field/number_field_morphisms.pyx.orig src/sage/rings/number_field/number_field_morphisms.pyx --- src/sage/rings/number_field/number_field_morphisms.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/number_field/number_field_morphisms.pyx 2020-10-30 11:34:26.056980219 -0600 @@ -340,7 +340,7 @@ cdef class EmbeddedNumberFieldConversion cpdef matching_root(poly, target, ambient_field=None, margin=1, max_prec=None): - """ + r""" Given a polynomial and a target, this function chooses the root that target best approximates as compared in ambient_field. @@ -403,7 +403,7 @@ cpdef matching_root(poly, target, ambien cpdef closest(target, values, margin=1): - """ + r""" This is a utility function that returns the item in values closest to target (with respect to the \code{abs} function). If margin is greater than 1, and x and y are the first and second closest elements to target, diff -up src/sage/rings/padics/local_generic_element.pyx.orig src/sage/rings/padics/local_generic_element.pyx --- src/sage/rings/padics/local_generic_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/padics/local_generic_element.pyx 2020-10-30 11:34:26.058980215 -0600 @@ -355,7 +355,7 @@ cdef class LocalGenericElement(Commutati return ans def _latex_(self): - """ + r""" Returns a latex representation of self. EXAMPLES:: diff -up src/sage/rings/padics/padic_capped_absolute_element.pyx.orig src/sage/rings/padics/padic_capped_absolute_element.pyx --- src/sage/rings/padics/padic_capped_absolute_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/padics/padic_capped_absolute_element.pyx 2020-10-30 11:34:26.059980214 -0600 @@ -383,7 +383,7 @@ cdef class pAdicCappedAbsoluteElement(CA return ans def _exp_binary_splitting(self, aprec): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. @@ -443,7 +443,7 @@ cdef class pAdicCappedAbsoluteElement(CA return ans def _exp_newton(self, aprec, log_algorithm=None): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. diff -up src/sage/rings/padics/padic_capped_relative_element.pyx.orig src/sage/rings/padics/padic_capped_relative_element.pyx --- src/sage/rings/padics/padic_capped_relative_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/padics/padic_capped_relative_element.pyx 2020-10-30 11:34:26.059980214 -0600 @@ -436,7 +436,7 @@ cdef class pAdicCappedRelativeElement(CR return ans def _exp_binary_splitting(self, aprec): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. @@ -498,7 +498,7 @@ cdef class pAdicCappedRelativeElement(CR return ans def _exp_newton(self, aprec, log_algorithm=None): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. diff -up src/sage/rings/padics/padic_fixed_mod_element.pyx.orig src/sage/rings/padics/padic_fixed_mod_element.pyx --- src/sage/rings/padics/padic_fixed_mod_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/padics/padic_fixed_mod_element.pyx 2020-10-30 11:34:26.059980214 -0600 @@ -449,7 +449,7 @@ cdef class pAdicFixedModElement(FMElemen return ans def _exp_binary_splitting(self, aprec): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. @@ -508,7 +508,7 @@ cdef class pAdicFixedModElement(FMElemen return ans def _exp_newton(self, aprec, log_algorithm=None): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. diff -up src/sage/rings/padics/padic_floating_point_element.pyx.orig src/sage/rings/padics/padic_floating_point_element.pyx --- src/sage/rings/padics/padic_floating_point_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/padics/padic_floating_point_element.pyx 2020-10-30 11:34:26.060980212 -0600 @@ -321,7 +321,7 @@ cdef class pAdicFloatingPointElement(FPE return Mod(selfvalue, modulus) def _exp_binary_splitting(self, aprec): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. @@ -382,7 +382,7 @@ cdef class pAdicFloatingPointElement(FPE return ans def _exp_newton(self, aprec, log_algorithm=None): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. diff -up src/sage/rings/padics/padic_generic_element.pyx.orig src/sage/rings/padics/padic_generic_element.pyx --- src/sage/rings/padics/padic_generic_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/padics/padic_generic_element.pyx 2020-10-30 11:34:26.060980212 -0600 @@ -543,7 +543,7 @@ cdef class pAdicGenericElement(LocalGene return self._repr_(mode=mode) def _repr_(self, mode=None, do_latex=False): - """ + r""" Returns a string representation of this element. INPUT: @@ -3022,7 +3022,7 @@ cdef class pAdicGenericElement(LocalGene return series_unit*nfactorial_unit.inverse_of_unit()<<(series_val-nfactorial_val) def _exp_binary_splitting(self, aprec): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. @@ -3068,7 +3068,7 @@ cdef class pAdicGenericElement(LocalGene raise NotImplementedError("The binary splitting algorithm is not implemented for the parent: %s" % self.parent()) def _exp_newton(self, aprec, log_algorithm=None): - """ + r""" Compute the exponential power series of this element This is a helper method for :meth:`exp`. diff -up src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx.orig src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx --- src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx 2020-10-30 11:59:47.735685950 -0600 @@ -904,7 +904,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE return ans def add_bigoh(self, absprec): - """ + r""" Return a new element truncated modulo \pi^absprec. This is only implemented for unramified extension at @@ -982,7 +982,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE return ans def matrix_mod_pn(self): - """ + r""" Returns the matrix of right multiplication by the element on the power basis `1, x, x^2, \ldots, x^{d-1}` for this extension field. Thus the \emph{rows} of this matrix give the diff -up src/sage/rings/polynomial/cyclotomic.pyx.orig src/sage/rings/polynomial/cyclotomic.pyx --- src/sage/rings/polynomial/cyclotomic.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/polynomial/cyclotomic.pyx 2020-10-30 11:34:26.063980208 -0600 @@ -193,7 +193,7 @@ def cyclotomic_coeffs(nn, sparse=None): return L def cyclotomic_value(n, x): - """ + r""" Return the value of the `n`-th cyclotomic polynomial evaluated at `x`. INPUT: diff -up src/sage/rings/polynomial/multi_polynomial_libsingular.pyx.orig src/sage/rings/polynomial/multi_polynomial_libsingular.pyx --- src/sage/rings/polynomial/multi_polynomial_libsingular.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/polynomial/multi_polynomial_libsingular.pyx 2020-10-30 11:34:26.064980206 -0600 @@ -2520,7 +2520,7 @@ cdef class MPolynomial_libsingular(MPoly return char_to_str(s) def _latex_(self): - """ + r""" Return a polynomial LaTeX representation of this polynomial. EXAMPLES:: diff -up src/sage/rings/polynomial/ore_polynomial_element.pyx.orig src/sage/rings/polynomial/ore_polynomial_element.pyx --- src/sage/rings/polynomial/ore_polynomial_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/polynomial/ore_polynomial_element.pyx 2020-10-30 12:06:24.031271497 -0600 @@ -1705,8 +1705,8 @@ cdef class OrePolynomial(AlgebraElement) var = "" s += "%s %s"%(x,var) s = s.replace(" + -", " - ") - s = re.sub(" 1(\.0+)? \|"," ", s) - s = re.sub(" -1(\.0+)? \|", " -", s) + s = re.sub(r" 1(\.0+)? \|"," ", s) + s = re.sub(r" -1(\.0+)? \|", " -", s) s = s.replace("|","") if s == " ": return "0" diff -up src/sage/rings/polynomial/polynomial_element.pyx.orig src/sage/rings/polynomial/polynomial_element.pyx --- src/sage/rings/polynomial/polynomial_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/polynomial/polynomial_element.pyx 2020-10-30 11:34:28.061977158 -0600 @@ -2639,8 +2639,8 @@ cdef class Polynomial(CommutativeAlgebra var = "" s += "%s %s" % (x, var) s = s.replace(" + -", " - ") - s = re.sub(" 1(\.0+)? \|"," ", s) - s = re.sub(" -1(\.0+)? \|", " -", s) + s = re.sub(r" 1(\.0+)? \|"," ", s) + s = re.sub(r" -1(\.0+)? \|", " -", s) s = s.replace("|","") if s == " ": return "0" @@ -2740,7 +2740,7 @@ cdef class Polynomial(CommutativeAlgebra raise IndexError("polynomials are immutable") cpdef _floordiv_(self, right): - """ + r""" Quotient of division of self by other. This is denoted //. If self = quotient \* right + remainder, this function returns @@ -6481,8 +6481,8 @@ cdef class Polynomial(CommutativeAlgebra where the roots `a` and `b` are to be considered in the algebraic closure of the fraction field of the coefficients and counted with multiplicities. If the polynomials are not monic this quantity is - multiplied by `\\alpha_1^{deg(p_2)} \\alpha_2^{deg(p_1)}` where - `\\alpha_1` and `\\alpha_2` are the leading coefficients of `p_1` and + multiplied by `\alpha_1^{deg(p_2)} \alpha_2^{deg(p_1)}` where + `\alpha_1` and `\alpha_2` are the leading coefficients of `p_1` and `p_2` respectively. INPUT: diff -up src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx.orig src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx --- src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx 2020-10-30 12:02:26.558489865 -0600 @@ -1352,7 +1352,7 @@ cdef class Polynomial_integer_dense_flin return smallInteger(fmpz_poly_degree(self.__poly)) def pseudo_divrem(self, B): - """ + r""" Write ``A = self``. This function computes polynomials `Q` and `R` and an integer `d` such that diff -up src/sage/rings/polynomial/real_roots.pyx.orig src/sage/rings/polynomial/real_roots.pyx --- src/sage/rings/polynomial/real_roots.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/polynomial/real_roots.pyx 2020-10-30 11:34:28.068977148 -0600 @@ -1252,7 +1252,7 @@ def de_casteljau_intvec(Vector_integer_d cdef double half_ulp = ldexp(1.0 * 65/64, -54) def intvec_to_doublevec(Vector_integer_dense b, long err): - """ + r""" Given a vector of integers A = [a1, ..., an], and an integer error bound E, returns a vector of floating-point numbers B = [b1, ..., bn], lower and upper error bounds F1 and F2, and @@ -2142,7 +2142,7 @@ def subsample_vec_doctest(a, slen, llen) return subsample_vec(a, slen, llen) def maximum_root_first_lambda(p): - """ + r""" Given a polynomial with real coefficients, computes an upper bound on its largest real root, using the first-\lambda algorithm from "Implementations of a New Theorem for Computing Bounds for Positive diff -up src/sage/rings/real_double.pyx.orig src/sage/rings/real_double.pyx --- src/sage/rings/real_double.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/real_double.pyx 2020-10-30 11:34:28.075977137 -0600 @@ -2092,7 +2092,7 @@ cdef class RealDoubleElement(FieldElemen return a def log(self, base=None): - """ + r""" Return the logarithm. INPUT: diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx --- src/sage/rings/real_mpfi.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/real_mpfi.pyx 2020-10-30 11:34:28.078977132 -0600 @@ -1321,7 +1321,7 @@ cdef class RealIntervalFieldElement(Ring return self.str(10) def _latex_(self): - """ + r""" Return a latex representation of ``self``. EXAMPLES:: diff -up src/sage/rings/semirings/tropical_semiring.pyx.orig src/sage/rings/semirings/tropical_semiring.pyx --- src/sage/rings/semirings/tropical_semiring.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/semirings/tropical_semiring.pyx 2020-10-30 11:34:28.081977128 -0600 @@ -99,7 +99,7 @@ cdef class TropicalSemiringElement(Eleme return repr(self._val) def _latex_(self): - """ + r""" Return a latex representation of ``self``. EXAMPLES:: diff -up src/sage/rings/tate_algebra_element.pyx.orig src/sage/rings/tate_algebra_element.pyx --- src/sage/rings/tate_algebra_element.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/rings/tate_algebra_element.pyx 2020-10-30 11:34:28.082977126 -0600 @@ -3447,7 +3447,7 @@ cdef class TateAlgebraElement(Commutativ @coerce_binop def Spoly(self, other): - """ + r""" Return the S-polynomial of this series and ``other``. INPUT: diff -up src/sage/structure/coerce_maps.pyx.orig src/sage/structure/coerce_maps.pyx --- src/sage/structure/coerce_maps.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/structure/coerce_maps.pyx 2020-10-30 11:34:28.083977125 -0600 @@ -312,7 +312,7 @@ cdef class NamedConvertMap(Map): cdef class CallableConvertMap(Map): def __init__(self, domain, codomain, func, parent_as_first_arg=None): - """ + r""" This lets one easily create maps from any callable object. This is especially useful to create maps from bound methods. diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx --- src/sage/symbolic/expression.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/symbolic/expression.pyx 2020-10-30 12:10:19.747169301 -0600 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -""" +r""" Symbolic Expressions RELATIONAL EXPRESSIONS: @@ -4830,7 +4830,7 @@ cdef class Expression(CommutativeRingEle expand_rational = rational_expand = expand def expand_trig(self, full=False, half_angles=False, plus=True, times=True): - """ + r""" Expand trigonometric and hyperbolic functions of sums of angles and of multiple angles occurring in self. For best results, self should already be expanded. @@ -7346,7 +7346,7 @@ cdef class Expression(CommutativeRingEle return new_Expression_from_GEx(self._parent, x) def gosper_term(self, n): - """ + r""" Return Gosper's hypergeometric term for ``self``. Suppose ``f``=``self`` is a hypergeometric term such that: diff -up src/sage/symbolic/function.pyx.orig src/sage/symbolic/function.pyx --- src/sage/symbolic/function.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/symbolic/function.pyx 2020-10-30 11:34:28.088977117 -0600 @@ -1581,7 +1581,7 @@ cdef class DeprecatedSFunction(SymbolicF evalf_params_first, pickled_functions)) def __setstate__(self, state): - """ + r""" EXAMPLES:: sage: from sage.symbolic.function import DeprecatedSFunction diff -up src/sage/symbolic/ring.pyx.orig src/sage/symbolic/ring.pyx --- src/sage/symbolic/ring.pyx.orig 2020-10-24 11:37:59.000000000 -0600 +++ src/sage/symbolic/ring.pyx 2020-10-30 11:34:28.089977116 -0600 @@ -86,7 +86,7 @@ cdef class SymbolicRing(CommutativeRing) return "Symbolic Ring" def _latex_(self): - """ + r""" Return latex representation of the symbolic ring. EXAMPLES:: @@ -483,7 +483,7 @@ cdef class SymbolicRing(CommutativeRing) return new_Expression_from_GEx(self, exp) def wild(self, unsigned int n=0): - """ + r""" Return the n-th wild-card for pattern matching and substitution. INPUT: @@ -735,7 +735,7 @@ cdef class SymbolicRing(CommutativeRing) return e def var(self, name, latex_name=None, n=None, domain=None): - """ + r""" Return a symbolic variable as an element of the symbolic ring. INPUT: