diff -up build/pkgs/ipython/src/IPython/core/completer.py.orig build/pkgs/ipython/src/IPython/core/completer.py --- build/pkgs/ipython/src/IPython/core/completer.py.orig 2018-07-28 18:24:17.000000000 -0600 +++ build/pkgs/ipython/src/IPython/core/completer.py 2020-02-26 11:30:50.639306162 -0700 @@ -771,7 +771,7 @@ class IPCompleter(Completer): return matches def _default_arguments_from_docstring(self, doc): - """Parse the first line of docstring for call signature. + r"""Parse the first line of docstring for call signature. Docstring should be of the form 'min(iterable[, key=func])\n'. It can also parse cython docstring of the form @@ -939,7 +939,7 @@ class IPCompleter(Completer): $ ''' regexps = self.__dict_key_regexps = { - False: re.compile(dict_key_re_fmt % ''' + False: re.compile(dict_key_re_fmt % r''' # identifiers separated by . (?!\d)\w+ (?:\.(?!\d)\w+)* diff -up build/pkgs/ipython/src/IPython/core/inputtransformer.py.orig build/pkgs/ipython/src/IPython/core/inputtransformer.py --- build/pkgs/ipython/src/IPython/core/inputtransformer.py.orig 2018-07-28 18:24:17.000000000 -0600 +++ build/pkgs/ipython/src/IPython/core/inputtransformer.py 2020-02-26 11:25:31.587048803 -0700 @@ -178,7 +178,7 @@ class assemble_python_lines(TokenInputTr @CoroutineInputTransformer.wrap def assemble_logical_lines(): - """Join lines following explicit line continuations (\)""" + r"""Join lines following explicit line continuations (\)""" line = '' while True: line = (yield line) @@ -362,7 +362,7 @@ def cellmagic(end_on_blank_line=False): reset (sent None). """ tpl = 'get_ipython().run_cell_magic(%r, %r, %r)' - cellmagic_help_re = re.compile('%%\w+\?') + cellmagic_help_re = re.compile(r'%%\w+\?') line = '' while True: line = (yield line) diff -up build/pkgs/ipython/src/IPython/core/magics/config.py.orig build/pkgs/ipython/src/IPython/core/magics/config.py --- build/pkgs/ipython/src/IPython/core/magics/config.py.orig 2018-07-28 18:24:17.000000000 -0600 +++ build/pkgs/ipython/src/IPython/core/magics/config.py 2020-02-26 11:00:14.674896818 -0700 @@ -26,7 +26,7 @@ from logging import error # Magic implementation classes #----------------------------------------------------------------------------- -reg = re.compile('^\w+\.\w+$') +reg = re.compile(r'^\w+\.\w+$') @magics_class class ConfigMagics(Magics): diff -up build/pkgs/ipython/src/IPython/core/splitinput.py.orig build/pkgs/ipython/src/IPython/core/splitinput.py --- build/pkgs/ipython/src/IPython/core/splitinput.py.orig 2018-07-28 18:24:17.000000000 -0600 +++ build/pkgs/ipython/src/IPython/core/splitinput.py 2020-02-26 10:58:24.452965715 -0700 @@ -41,7 +41,7 @@ from IPython.utils.encoding import get_s # ! and !! trigger if they are first char(s) *or* follow an indent # ? triggers as first or last char. -line_split = re.compile(""" +line_split = re.compile(r""" ^(\s*) # any leading space ([,;/%]|!!?|\?\??)? # escape character or characters \s*(%{0,2}[\w\.\*]*) # function/method, possibly with leading % diff -up build/pkgs/ipython/src/IPython/utils/text.py.orig build/pkgs/ipython/src/IPython/utils/text.py --- build/pkgs/ipython/src/IPython/utils/text.py.orig 2018-07-28 18:24:17.000000000 -0600 +++ build/pkgs/ipython/src/IPython/utils/text.py 2020-02-26 11:02:58.842051890 -0700 @@ -594,7 +594,7 @@ class DollarFormatter(FullEvalFormatter) In [4]: f.format('$a or {b}', a=1, b=2) Out[4]: u'1 or 2' """ - _dollar_pattern = re.compile("(.*?)\$(\$?[\w\.]+)") + _dollar_pattern = re.compile(r"(.*?)\$(\$?[\w\.]+)") def parse(self, fmt_string): for literal_txt, field_name, format_spec, conversion \ in Formatter.parse(self, fmt_string): diff -up build/pkgs/ipython/src/IPython/utils/_tokenize_py3.py.orig build/pkgs/ipython/src/IPython/utils/_tokenize_py3.py --- build/pkgs/ipython/src/IPython/utils/_tokenize_py3.py.orig 2018-07-28 18:24:17.000000000 -0600 +++ build/pkgs/ipython/src/IPython/utils/_tokenize_py3.py 2020-02-26 11:04:04.592962168 -0700 @@ -47,7 +47,7 @@ from token import * from codecs import lookup, BOM_UTF8 import collections from io import TextIOWrapper -cookie_re = re.compile("coding[:=]\s*([-\w.]+)") +cookie_re = re.compile(r"coding[:=]\s*([-\w.]+)") import token __all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding", 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-05-20 16:33:41.000000000 -0600 +++ src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx 2020-07-06 16:08:09.909517122 -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-05-20 16:33:41.000000000 -0600 +++ src/sage/algebras/letterplace/free_algebra_letterplace.pyx 2020-07-06 16:08:09.911517122 -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/algebras/lie_algebras/lie_algebra_element.pyx.orig src/sage/algebras/lie_algebras/lie_algebra_element.pyx --- src/sage/algebras/lie_algebras/lie_algebra_element.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/algebras/lie_algebras/lie_algebra_element.pyx 2020-07-06 16:08:09.912517122 -0600 @@ -1014,7 +1014,7 @@ cdef class UntwistedAffineLieAlgebraElem + (E_{-\alpha_{1}}) \otimes t^{1} + 3 c + -2 d """ from sage.misc.latex import latex - ret = ' + '.join('({}) \otimes t^{{{}}}'.format(latex(g), t) + ret = ' + '.join(r'({}) \otimes t^{{{}}}'.format(latex(g), t) for t,g in self._t_dict.iteritems()) if self._c_coeff != 0: if ret: diff -up src/sage/arith/multi_modular.pyx.orig src/sage/arith/multi_modular.pyx --- src/sage/arith/multi_modular.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/arith/multi_modular.pyx 2020-07-06 16:08:09.914517122 -0600 @@ -678,7 +678,7 @@ cdef class MultiModularBasis_base(object return z def precomputation_list(self): - """ + r""" Return a list of the precomputed coefficients `\prod_j=1^{i-1} m_j^{-1} (mod m_i)` where `m_i` are the prime moduli. diff -up src/sage/calculus/transforms/dwt.pyx.orig src/sage/calculus/transforms/dwt.pyx --- src/sage/calculus/transforms/dwt.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/calculus/transforms/dwt.pyx 2020-07-06 16:08:09.915517122 -0600 @@ -24,7 +24,7 @@ AUTHOR: import sage.plot.all def WaveletTransform(n, wavelet_type, wavelet_k): - """ + r""" This function initializes an GSLDoubleArray of length n which can perform a discrete wavelet transform. diff -up src/sage/coding/binary_code.pyx.orig src/sage/coding/binary_code.pyx --- src/sage/coding/binary_code.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/coding/binary_code.pyx 2020-07-06 16:08:09.917517122 -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-05-20 16:33:41.000000000 -0600 +++ src/sage/coding/codecan/codecan.pyx 2020-07-06 16:08:09.918517122 -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)) @@ -741,7 +741,7 @@ cdef class PartitionRefinementLinearCode return self._inner_group_stabilizer_order cdef _init_point_hyperplane_incidence(self): - """ + r""" Compute a set of codewords `W` of `C` (generated by self) which is compatible with the group action, i.e. if we start with some other code `(g,\pi)C` the result should be `(g,\pi)W`. diff -up src/sage/combinat/crystals/letters.pyx.orig src/sage/combinat/crystals/letters.pyx --- src/sage/combinat/crystals/letters.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/combinat/crystals/letters.pyx 2020-07-06 16:08:09.920517121 -0600 @@ -510,7 +510,7 @@ cdef class Letter(Element): return False cdef class EmptyLetter(Element): - """ + r""" The affine letter `\emptyset` thought of as a classical crystal letter in classical type `B_n` and `C_n`. @@ -558,7 +558,7 @@ cdef class EmptyLetter(Element): return 'E' def _latex_(self): - """ + r""" Return a latex representation of ``self``. EXAMPLES:: @@ -2493,7 +2493,7 @@ cdef class BKKLetter(Letter): return ret class CrystalOfBKKLetters(ClassicalCrystalOfLetters): - """ + r""" Crystal of letters for Benkart-Kang-Kashiwara supercrystals. This implements the `\mathfrak{gl}(m|n)` crystal of 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-05-20 16:33:41.000000000 -0600 +++ src/sage/combinat/crystals/tensor_product_element.pyx 2020-07-06 16:08:09.922517121 -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/combinat/integer_lists/base.pyx.orig src/sage/combinat/integer_lists/base.pyx --- src/sage/combinat/integer_lists/base.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/combinat/integer_lists/base.pyx 2020-07-06 16:08:09.923517121 -0600 @@ -269,7 +269,7 @@ cdef class IntegerListsBackend(object): cdef class Envelope(object): - """ + r""" The (currently approximated) upper (lower) envelope of a function under the specified constraints. @@ -523,7 +523,7 @@ cdef class Envelope(object): return self.f_limit_start def limit(self): - """ + r""" Return a bound on the limit of ``self``. OUTPUT: a nonnegative integer or `\infty` diff -up src/sage/combinat/root_system/reflection_group_c.pyx.orig src/sage/combinat/root_system/reflection_group_c.pyx --- src/sage/combinat/root_system/reflection_group_c.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/combinat/root_system/reflection_group_c.pyx 2020-07-06 16:08:09.924517121 -0600 @@ -459,7 +459,7 @@ cdef int first_descent_in_parabolic(Perm cpdef PermutationGroupElement reduce_in_coset(PermutationGroupElement w, tuple S, list parabolic, int N, bint right): - """ + r""" Return the minimal length coset representative of ``w`` of the parabolic subgroup indexed by ``parabolic`` (with indices `\{0, \ldots, n\}`). diff -up src/sage/combinat/root_system/reflection_group_element.pyx.orig src/sage/combinat/root_system/reflection_group_element.pyx --- src/sage/combinat/root_system/reflection_group_element.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/combinat/root_system/reflection_group_element.pyx 2020-07-06 16:08:09.926517121 -0600 @@ -1109,7 +1109,7 @@ def _gap_factorization(w, gens): fac = gap3('MinimalWord(W,%s)'%str(w)).sage() return [i-1 for i in fac] -_gap_factorization_code = """ +_gap_factorization_code = r""" # MinimalWord(G,w) # given a permutation group G find some expression of minimal length in the # generators of G and their inverses of the element w (an inverse is diff -up src/sage/crypto/boolean_function.pyx.orig src/sage/crypto/boolean_function.pyx --- src/sage/crypto/boolean_function.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/crypto/boolean_function.pyx 2020-07-06 16:08:09.927517121 -0600 @@ -1108,7 +1108,7 @@ cdef class BooleanFunction(SageObject): return (len(W) == 1) or (len(W) == 2 and 0 in W) def is_linear_structure(self, val): - """ + r""" Return ``True`` if ``val`` is a linear structure of this Boolean function. @@ -1178,7 +1178,7 @@ cdef class BooleanFunction(SageObject): raise TypeError("cannot compute is_linear_structure() using parameter %s" % (val,)) def has_linear_structure(self): - """ + r""" Return ``True`` if this function has a linear structure. An `n`-variable Boolean function `f` has a linear structure if @@ -1209,7 +1209,7 @@ cdef class BooleanFunction(SageObject): return any(abs(a[i]) == 1<`` AUTHORS: diff -up src/sage/matrix/matrix_modn_dense_float.pyx.orig src/sage/matrix/matrix_modn_dense_float.pyx --- src/sage/matrix/matrix_modn_dense_float.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/matrix/matrix_modn_dense_float.pyx 2020-07-06 16:09:35.599512717 -0600 @@ -1,4 +1,4 @@ -""" +r""" Dense matrices over `\ZZ/n\ZZ` for `n < 2^{11}` using LinBox's ``Modular`` AUTHORS: 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-05-20 16:33:41.000000000 -0600 +++ src/sage/matrix/matrix_modn_dense_template.pxi 2020-07-06 16:11:45.224506062 -0600 @@ -1,4 +1,4 @@ -""" +r""" Dense matrices over `\ZZ/n\ZZ` for `n` small using the LinBox library (FFLAS/FFPACK) FFLAS/FFPACK are libraries to provide BLAS/LAPACK-style routines for @@ -663,7 +663,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:: @@ -861,7 +861,7 @@ cdef class Matrix_modn_dense_template(Ma cpdef _add_(self, right): - """ + r""" Add two dense matrices over `\Z/n\Z` INPUT: @@ -2525,7 +2525,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-05-20 16:33:41.000000000 -0600 +++ src/sage/matrix/matrix_polynomial_dense.pyx 2020-07-06 16:11:53.415505643 -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-05-20 16:33:41.000000000 -0600 +++ src/sage/matrix/matrix_rational_dense.pyx 2020-07-06 16:11:53.416505643 -0600 @@ -489,7 +489,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: @@ -902,7 +902,7 @@ cdef class Matrix_rational_dense(Matrix_ return 0 def _clear_denom(self): - """ + r""" INPUT: @@ -958,7 +958,7 @@ cdef class Matrix_rational_dense(Matrix_ return X def charpoly(self, var='x', algorithm=None): - """ + r""" Return the characteristic polynomial of this matrix. .. NOTE:: @@ -1169,7 +1169,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-05-20 16:33:41.000000000 -0600 +++ src/sage/matroids/basis_exchange_matroid.pyx 2020-07-06 16:11:53.417505643 -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/basis_matroid.pyx.orig src/sage/matroids/basis_matroid.pyx --- src/sage/matroids/basis_matroid.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/matroids/basis_matroid.pyx 2020-07-06 16:11:53.418505643 -0600 @@ -1281,7 +1281,7 @@ cdef long set_to_index(bitset_t S): return index cdef index_to_set(bitset_t S, long index, long k, long n): - """ + r""" Compute the k-subset of `\{0, ..., n-1\}` of rank index """ bitset_clear(S) diff -up src/sage/matroids/extension.pyx.orig src/sage/matroids/extension.pyx --- src/sage/matroids/extension.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/matroids/extension.pyx 2020-07-06 16:11:53.419505643 -0600 @@ -247,7 +247,7 @@ cdef class LinearSubclassesIter: cdef class LinearSubclasses: - """ + r""" An iterable set of linear subclasses of a matroid. Enumerate linear subclasses of a given matroid. A *linear subclass* is a @@ -411,7 +411,7 @@ cdef class LinearSubclasses: cdef class MatroidExtensions(LinearSubclasses): - """ + r""" An iterable set of single-element extensions of a given matroid. INPUT: diff -up src/sage/matroids/lean_matrix.pyx.orig src/sage/matroids/lean_matrix.pyx --- src/sage/matroids/lean_matrix.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/matroids/lean_matrix.pyx 2020-07-06 16:11:53.420505642 -0600 @@ -2721,7 +2721,7 @@ cdef class QuaternaryMatrix(LeanMatrix): return sage.matroids.unpickling.unpickle_quaternary_matrix, (version, data) cpdef GenericMatrix generic_identity(n, ring): - """ + r""" Return a GenericMatrix instance containing the `n \times n` identity matrix over ``ring``. diff -up src/sage/matroids/linear_matroid.pyx.orig src/sage/matroids/linear_matroid.pyx --- src/sage/matroids/linear_matroid.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/matroids/linear_matroid.pyx 2020-07-06 16:11:53.423505642 -0600 @@ -757,7 +757,7 @@ cdef class LinearMatroid(BasisExchangeMa return {e: R[self._idx[e]] for e in self.groundset()} cpdef LeanMatrix _reduced_representation(self, B=None): - """ + r""" Return a reduced representation of the matroid, i.e. a matrix `R` such that `[I\ \ R]` represents the matroid. @@ -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. @@ -1318,7 +1318,7 @@ cdef class LinearMatroid(BasisExchangeMa return type(self)(reduced_matrix=M, groundset=rows + cols) cpdef dual(self): - """ + r""" Return the dual of the matroid. Let `M` be a matroid with ground set `E`. If `B` is the set of bases @@ -1350,7 +1350,7 @@ cdef class LinearMatroid(BasisExchangeMa return type(self)(reduced_matrix=R, groundset=cols + rows) cpdef has_line_minor(self, k, hyperlines=None, certificate=False): - """ + r""" Test if the matroid has a `U_{2, k}`-minor. The matroid `U_{2, k}` is a matroid on `k` elements in which every @@ -3093,7 +3093,7 @@ cdef class BinaryMatroid(LinearMatroid): self._one = GF2_one cpdef base_ring(self): - """ + r""" Return the base ring of the matrix representing the matroid, in this case `\GF{2}`. @@ -3273,7 +3273,7 @@ cdef class BinaryMatroid(LinearMatroid): return self._A.copy() # Deprecated Sage matrix operation cpdef LeanMatrix _reduced_representation(self, B=None): - """ + r""" Return a reduced representation of the matroid, i.e. a matrix `R` such that `[I\ \ R]` represents the matroid. @@ -4161,7 +4161,7 @@ cdef class TernaryMatroid(LinearMatroid) self._two = GF3_minus_one cpdef base_ring(self): - """ + r""" Return the base ring of the matrix representing the matroid, in this case `\GF{3}`. @@ -4345,7 +4345,7 @@ cdef class TernaryMatroid(LinearMatroid) return self._A.copy() # Deprecated Sage matrix operation cpdef LeanMatrix _reduced_representation(self, B=None): - """ + r""" Return a reduced representation of the matroid, i.e. a matrix `R` such that `[I\ \ R]` represents the matroid. @@ -4527,7 +4527,7 @@ cdef class TernaryMatroid(LinearMatroid) return self._t_invariant cpdef bicycle_dimension(self): - """ + r""" Return the bicycle dimension of the ternary matroid. The bicycle dimension of a linear subspace `V` is @@ -5060,7 +5060,7 @@ cdef class QuaternaryMatroid(LinearMatro self._x_one = (self._A)._x_one cpdef base_ring(self): - """ + r""" Return the base ring of the matrix representing the matroid, in this case `\GF{4}`. @@ -5237,7 +5237,7 @@ cdef class QuaternaryMatroid(LinearMatro return self._A.copy() # Deprecated Sage matrix operation cpdef LeanMatrix _reduced_representation(self, B=None): - """ + r""" Return a reduced representation of the matroid, i.e. a matrix `R` such that `[I\ \ R]` represents the matroid. @@ -5377,7 +5377,7 @@ cdef class QuaternaryMatroid(LinearMatro return self._q_invariant cpdef bicycle_dimension(self): - """ + r""" Return the bicycle dimension of the quaternary matroid. The bicycle dimension of a linear subspace `V` is @@ -5774,7 +5774,7 @@ cdef class RegularMatroid(LinearMatroid) return P cpdef base_ring(self): - """ + r""" Return the base ring of the matrix representing the matroid, in this case `\ZZ`. @@ -6192,7 +6192,7 @@ cdef class RegularMatroid(LinearMatroid) return {e:idx[m[str(e)]] for e in self.groundset() if str(e) in m} cpdef has_line_minor(self, k, hyperlines=None, certificate=False): - """ + r""" Test if the matroid has a `U_{2, k}`-minor. The matroid `U_{2, k}` is a matroid on `k` elements in which every diff -up src/sage/matroids/matroid.pyx.orig src/sage/matroids/matroid.pyx --- src/sage/matroids/matroid.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/matroids/matroid.pyx 2020-07-06 16:11:53.426505642 -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: @@ -3886,7 +3886,7 @@ cdef class Matroid(SageObject): return self.delete(X) cpdef dual(self): - """ + r""" Return the dual of the matroid. Let `M` be a matroid with ground set `E`. If `B` is the set of bases @@ -3998,7 +3998,7 @@ cdef class Matroid(SageObject): return self._has_minor(N, certificate) cpdef has_line_minor(self, k, hyperlines=None, certificate=False): - """ + r""" Test if the matroid has a `U_{2, k}`-minor. The matroid `U_{2, k}` is a matroid on `k` elements in which every @@ -4070,7 +4070,7 @@ cdef class Matroid(SageObject): return self._has_line_minor(k, hyperlines, certificate) cpdef _has_line_minor(self, k, hyperlines, certificate=False): - """ + r""" Test if the matroid has a `U_{2, k}`-minor. Internal version that does no input checking. @@ -4258,7 +4258,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 @@ -4348,7 +4348,7 @@ cdef class Matroid(SageObject): return final_list cpdef linear_subclasses(self, line_length=None, subsets=None): - """ + r""" Return an iterable set of linear subclasses of the matroid. A *linear subclass* is a set of hyperplanes (i.e. closed sets of rank @@ -4659,7 +4659,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. @@ -4736,7 +4736,7 @@ cdef class Matroid(SageObject): return components cpdef is_connected(self, certificate=False): - """ + r""" Test if the matroid is connected. A *separation* in a matroid is a partition `(X, Y)` of the @@ -7428,7 +7428,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/matroids/set_system.pyx.orig src/sage/matroids/set_system.pyx --- src/sage/matroids/set_system.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/matroids/set_system.pyx 2020-07-06 16:11:53.427505642 -0600 @@ -510,7 +510,7 @@ cdef class SetSystem: return P cpdef _equitable_partition(self, SetSystem P=None, EP=None): - """ + r""" Return an equitable ordered partition of the ground set of the hypergraph whose edges are the subsets in this SetSystem. diff -up src/sage/misc/cachefunc.pyx.orig src/sage/misc/cachefunc.pyx --- src/sage/misc/cachefunc.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/misc/cachefunc.pyx 2020-07-06 16:11:53.429505642 -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/modular/arithgroup/arithgroup_element.pyx.orig src/sage/modular/arithgroup/arithgroup_element.pyx --- src/sage/modular/arithgroup/arithgroup_element.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/modular/arithgroup/arithgroup_element.pyx 2020-07-06 16:11:53.430505642 -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/congroup.pyx.orig src/sage/modular/arithgroup/congroup.pyx --- src/sage/modular/arithgroup/congroup.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/modular/arithgroup/congroup.pyx 2020-07-06 16:11:53.430505642 -0600 @@ -1,4 +1,4 @@ -""" +r""" Cython helper functions for congruence subgroups This file contains optimized Cython implementations of a few functions related 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-05-20 16:33:41.000000000 -0600 +++ src/sage/modular/arithgroup/farey_symbol.pyx 2020-07-06 16:11:53.431505642 -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-05-20 16:33:41.000000000 -0600 +++ src/sage/modular/modsym/heilbronn.pyx 2020-07-06 16:11:53.432505642 -0600 @@ -209,7 +209,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/modular/modsym/manin_symbol.pyx.orig src/sage/modular/modsym/manin_symbol.pyx --- src/sage/modular/modsym/manin_symbol.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/modular/modsym/manin_symbol.pyx 2020-07-06 16:11:53.432505642 -0600 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -""" +r""" Manin symbols This module defines the class ManinSymbol. A Manin symbol of diff -up src/sage/modular/modsym/p1list.pyx.orig src/sage/modular/modsym/p1list.pyx --- src/sage/modular/modsym/p1list.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/modular/modsym/p1list.pyx 2020-07-06 16:11:53.433505642 -0600 @@ -27,7 +27,7 @@ ctypedef long long llong cdef int c_p1_normalize_int(int N, int u, int v, int* uu, int* vv, int* ss, int compute_s) except -1: - """ + r""" Computes the canonical representative of `\mathbb{P}^1(\ZZ/N\ZZ)` equivalent to `(u,v)` along with a transforming scalar. @@ -478,7 +478,7 @@ def p1list_llong(int N): return lst def p1list(N): - """ + r""" Returns the elements of the projective line modulo `N`, `\mathbb{P}^1(\ZZ/N\ZZ)`, as a plain list of 2-tuples. @@ -655,7 +655,7 @@ cdef int p1_normalize_xgcdtable(int N, i cdef class P1List(object): - """ + r""" The class for `\mathbb{P}^1(\ZZ/N\ZZ)`, the projective line modulo `N`. EXAMPLES:: @@ -673,7 +673,7 @@ cdef class P1List(object): True """ def __init__(self, int N): - """ + r""" The constructor for the class P1List. INPUT: @@ -824,7 +824,7 @@ cdef class P1List(object): return "The projective line over the integers modulo %s"%self.__N def lift_to_sl2z(self, int i): - """ + r""" Lift the `i`'th element of this P1list to an element of `SL(2,\ZZ)`. @@ -1187,7 +1187,7 @@ cdef class export: return c_p1_normalize_llong(N, u, v, uu, vv, ss, compute_s) def lift_to_sl2z_int(int c, int d, int N): - """ + r""" Lift a pair `(c, d)` to an element of `SL(2, \ZZ)`. `(c,d)` is assumed to be an element of 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-05-20 16:33:41.000000000 -0600 +++ src/sage/modules/free_module_element.pyx 2020-07-06 16:11:53.435505642 -0600 @@ -2019,7 +2019,7 @@ cdef class FreeModuleElement(Vector): return copy(self) def lift_centered(self): - """ + r""" Lift to a congruent, centered vector. INPUT: @@ -2391,7 +2391,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 @@ -3662,7 +3662,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-05-20 16:33:41.000000000 -0600 +++ src/sage/numerical/backends/generic_backend.pyx 2020-07-06 16:11:53.436505642 -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-05-20 16:33:41.000000000 -0600 +++ src/sage/numerical/backends/glpk_backend.pyx 2020-07-06 16:11:53.438505642 -0600 @@ -2130,7 +2130,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 @@ -2161,7 +2161,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. @@ -2191,7 +2191,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 @@ -2222,7 +2222,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-05-20 16:33:41.000000000 -0600 +++ src/sage/numerical/backends/interactivelp_backend.pyx 2020-07-06 16:11:53.438505642 -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/quadratic_forms/count_local_2.pyx.orig src/sage/quadratic_forms/count_local_2.pyx --- src/sage/quadratic_forms/count_local_2.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/quadratic_forms/count_local_2.pyx 2020-07-06 16:11:53.439505642 -0600 @@ -168,7 +168,7 @@ cdef CountAllLocalTypesNaive_cdef(Q, p, def CountAllLocalTypesNaive(Q, p, k, m, zvec, nzvec): - """ + r""" This is an internal routine, which is called by :meth:`sage.quadratic_forms.quadratic_form.QuadraticForm.count_congruence_solutions_by_type QuadraticForm.count_congruence_solutions_by_type`. See the documentation of diff -up src/sage/quivers/algebra_elements.pyx.orig src/sage/quivers/algebra_elements.pyx --- src/sage/quivers/algebra_elements.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/quivers/algebra_elements.pyx 2020-07-06 16:11:53.440505641 -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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/bernoulli_mod_p.pyx 2020-07-06 16:11:53.440505641 -0600 @@ -35,7 +35,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_arb.pyx.orig src/sage/rings/complex_arb.pyx --- src/sage/rings/complex_arb.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/complex_arb.pyx 2020-07-06 16:11:53.442505642 -0600 @@ -2923,7 +2923,7 @@ cdef class ComplexBall(RingElement): return res def rising_factorial(self, n): - """ + r""" Return the ``n``-th rising factorial of this ball. The `n`-th rising factorial of `x` is equal to `x (x+1) \cdots (x+n-1)`. @@ -3641,7 +3641,7 @@ cdef class ComplexBall(RingElement): return res def polylog(self, s): - """ + r""" Return the polylogarithm `\operatorname{Li}_s(\mathrm{self})`. EXAMPLES:: diff -up src/sage/rings/complex_double.pyx.orig src/sage/rings/complex_double.pyx --- src/sage/rings/complex_double.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/complex_double.pyx 2020-07-06 16:11:53.443505641 -0600 @@ -1595,7 +1595,7 @@ cdef class ComplexDoubleElement(FieldEle return self.real().is_NaN() or self.imag().is_NaN() cpdef _pow_(self, other): - """ + r""" The complex number ``self`` raised to the power ``other``. This is computed using complex logarithms and exponentials diff -up src/sage/rings/complex_interval.pyx.orig src/sage/rings/complex_interval.pyx --- src/sage/rings/complex_interval.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/complex_interval.pyx 2020-07-06 16:11:53.444505641 -0600 @@ -714,7 +714,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 @@ -1096,7 +1096,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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/complex_mpc.pyx 2020-07-06 16:11:53.445505641 -0600 @@ -147,15 +147,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): """ @@ -195,17 +195,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: @@ -217,18 +217,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 @@ -1725,7 +1725,7 @@ cdef class MPComplexNumber(sage.structur return z def cosh(self): - """ + r""" Return the hyperbolic cosine of this complex number: .. MATH:: @@ -1745,7 +1745,7 @@ cdef class MPComplexNumber(sage.structur return z def sinh(self): - """ + r""" Return the hyperbolic sine of this complex number: .. MATH:: @@ -2089,7 +2089,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/complex_number.pyx.orig src/sage/rings/complex_number.pyx --- src/sage/rings/complex_number.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/complex_number.pyx 2020-07-06 16:11:53.446505641 -0600 @@ -1741,7 +1741,7 @@ cdef class ComplexNumber(sage.structure. # Other special functions def agm(self, right, algorithm="optimal"): - """ + r""" Return the Arithmetic-Geometric Mean (AGM) of ``self`` and ``right``. INPUT: diff -up src/sage/rings/finite_rings/element_givaro.pyx.orig src/sage/rings/finite_rings/element_givaro.pyx --- src/sage/rings/finite_rings/element_givaro.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/finite_rings/element_givaro.pyx 2020-07-06 16:11:53.446505641 -0600 @@ -1204,7 +1204,7 @@ cdef class FiniteField_givaroElement(Fin return make_FiniteField_givaroElement(self._cache,r) def __pow__(FiniteField_givaroElement self, exp, other): - """ + r""" EXAMPLES:: sage: K. = GF(3^3, 'a') @@ -1345,7 +1345,7 @@ cdef class FiniteField_givaroElement(Fin return self_int def integer_representation(FiniteField_givaroElement self): - """ + r""" Return the integer representation of ``self``. When ``self`` is in the prime subfield, the integer returned is equal to ``self``. diff -up src/sage/rings/finite_rings/element_ntl_gf2e.pyx.orig src/sage/rings/finite_rings/element_ntl_gf2e.pyx --- src/sage/rings/finite_rings/element_ntl_gf2e.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/finite_rings/element_ntl_gf2e.pyx 2020-07-06 16:11:53.447505641 -0600 @@ -400,7 +400,7 @@ cdef class Cache_ntl_gf2e(SageObject): raise ValueError("Cannot coerce element %s to this field." % e) cpdef FiniteField_ntl_gf2eElement fetch_int(self, number): - """ + r""" Given an integer less than `p^n` with base `2` representation `a_0 + a_1 \cdot 2 + \cdots + a_k 2^k`, this returns `a_0 + a_1 x + \cdots + a_k x^k`, where `x` is the diff -up src/sage/rings/finite_rings/finite_field_base.pyx.orig src/sage/rings/finite_rings/finite_field_base.pyx --- src/sage/rings/finite_rings/finite_field_base.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/finite_rings/finite_field_base.pyx 2020-07-06 16:11:53.448505641 -0600 @@ -959,7 +959,7 @@ cdef class FiniteField(Field): return self._modulus def polynomial(self, name=None): - """ + r""" Return the minimal polynomial of the generator of ``self`` over the prime finite field. 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/finite_rings/hom_finite_field.pyx 2020-07-06 16:11:53.448505641 -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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/finite_rings/integer_mod.pyx 2020-07-06 16:11:53.449505641 -0600 @@ -115,7 +115,7 @@ from sage.structure.parent cimport Paren cdef Integer one_Z = Integer(1) def Mod(n, m, parent=None): - """ + r""" Return the equivalence class of `n` modulo `m` as an element of `\ZZ/m\ZZ`. @@ -1547,7 +1547,7 @@ cdef class IntegerMod_abstract(FiniteRin return [a for a in self.parent() if a**n == self] def _balanced_abs(self): - """ + r""" This function returns `x` or `-x`, whichever has a positive representative in `-n/2 < x \leq n/2`. @@ -1896,7 +1896,7 @@ cdef class IntegerMod_abstract(FiniteRin cdef class IntegerMod_gmp(IntegerMod_abstract): - """ + r""" Elements of `\ZZ/n\ZZ` for n not small enough to be operated on in word size. @@ -2180,7 +2180,7 @@ cdef class IntegerMod_gmp(IntegerMod_abs return long(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) @@ -2289,7 +2289,7 @@ cdef class IntegerMod_gmp(IntegerMod_abs @coerce_binop def gcd(self, IntegerMod_gmp other): - """ + r""" Greatest common divisor Returns the "smallest" generator in `\ZZ / N\ZZ` of the ideal @@ -2322,7 +2322,7 @@ cdef class IntegerMod_gmp(IntegerMod_abs cdef class IntegerMod_int(IntegerMod_abstract): - """ + r""" Elements of `\ZZ/n\ZZ` for n small enough to be operated on in 32 bits @@ -2941,7 +2941,7 @@ cdef class IntegerMod_int(IntegerMod_abs def _balanced_abs(self): - """ + r""" This function returns `x` or `-x`, whichever has a positive representative in `-n/2 < x \leq n/2`. """ @@ -2952,7 +2952,7 @@ cdef class IntegerMod_int(IntegerMod_abs @coerce_binop def gcd(self, IntegerMod_int other): - """ + r""" Greatest common divisor Returns the "smallest" generator in `\ZZ / N\ZZ` of the ideal @@ -3130,7 +3130,7 @@ cdef int jacobi_int(int_fast32_t a, int_ ###################################################################### cdef class IntegerMod_int64(IntegerMod_abstract): - """ + r""" Elements of `\ZZ/n\ZZ` for n small enough to be operated on in 64 bits @@ -3443,7 +3443,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) @@ -3591,7 +3591,7 @@ cdef class IntegerMod_int64(IntegerMod_a return hash(self.ivalue) def _balanced_abs(self): - """ + r""" This function returns `x` or `-x`, whichever has a positive representative in `-n/2 < x \leq n/2`. """ @@ -3602,7 +3602,7 @@ cdef class IntegerMod_int64(IntegerMod_a @coerce_binop def gcd(self, IntegerMod_int64 other): - """ + r""" Greatest common divisor Returns the "smallest" generator in `\ZZ / N\ZZ` of the ideal diff -up src/sage/rings/finite_rings/residue_field.pyx.orig src/sage/rings/finite_rings/residue_field.pyx --- src/sage/rings/finite_rings/residue_field.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/finite_rings/residue_field.pyx 2020-07-06 16:11:53.450505641 -0600 @@ -1,4 +1,4 @@ -""" +r""" Finite residue fields We can take the residue field of maximal ideals in the ring of integers @@ -1808,7 +1808,7 @@ class ResidueFiniteField_ntl_gf2e(Residu """ # we change the order for consistency with FiniteField_ntl_gf2e's __cinit__ def __init__(self, q, name, modulus, repr, p, to_vs, to_order, PB): - """ + r""" INPUT: - ``p`` -- the prime ideal defining this residue field 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/function_field/element.pyx 2020-07-06 16:11:53.450505641 -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/integer_ring.pyx.orig src/sage/rings/integer_ring.pyx --- src/sage/rings/integer_ring.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/integer_ring.pyx 2020-07-06 16:13:17.431497411 -0600 @@ -391,7 +391,7 @@ cdef class IntegerRing_class(PrincipalId return "\\Bold{Z}" def __getitem__(self, x): - """ + r""" Return the ring `\ZZ[...]` obtained by adjoining to the integers one or several elements. @@ -1143,7 +1143,7 @@ cdef class IntegerRing_class(PrincipalId return sage.rings.infinity.infinity def zeta(self, n=2): - """ + r""" Return a primitive ``n``-th root of unity in the integers, or raise an error if none exists. diff -up src/sage/rings/laurent_series_ring_element.pyx.orig src/sage/rings/laurent_series_ring_element.pyx --- src/sage/rings/laurent_series_ring_element.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/laurent_series_ring_element.pyx 2020-07-06 16:13:17.432497411 -0600 @@ -86,7 +86,7 @@ def is_LaurentSeries(x): cdef class LaurentSeries(AlgebraElement): - """ + r""" A Laurent Series. We consider a Laurent series of the form `t^n \cdot f` where `f` is a 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/number_field/number_field_element.pyx 2020-07-06 16:13:17.434497411 -0600 @@ -484,7 +484,7 @@ cdef class NumberFieldElement(FieldEleme return codomain(f(im_gens[0])) def _latex_(self): - """ + r""" Returns the latex representation for this element. EXAMPLES:: @@ -3878,7 +3878,7 @@ cdef class NumberFieldElement(FieldEleme return ht def global_height_non_arch(self, prec=None): - """ + r""" Returns the total non-archimedean component of the height of self. INPUT: diff -up src/sage/rings/number_field/number_field_element_quadratic.pyx.orig src/sage/rings/number_field/number_field_element_quadratic.pyx --- src/sage/rings/number_field/number_field_element_quadratic.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/number_field/number_field_element_quadratic.pyx 2020-07-06 16:13:17.436497411 -0600 @@ -1,4 +1,4 @@ -""" +r""" Optimized Quadratic Number Field Elements This file defines a Cython class ``NumberFieldElement_quadratic`` to speed up @@ -861,7 +861,7 @@ cdef class NumberFieldElement_quadratic( return res def parts(self): - """ + r""" This function returns a pair of rationals `a` and `b` such that self `= a+b\sqrt{D}`. @@ -1606,7 +1606,7 @@ cdef class NumberFieldElement_quadratic( ################################################################################# def __hash__(self): - """ + r""" Return hash of this number field element. For elements in `\ZZ` or `\QQ` the hash coincides with the one in the @@ -2040,7 +2040,7 @@ cdef class NumberFieldElement_quadratic( def norm(self, K=None): - """ + r""" Return the norm of self. If the second argument is None, this is the norm down to `\QQ`. Otherwise, return the norm down to K (which had better be either `\QQ` or this number field). 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/number_field/number_field_morphisms.pyx 2020-07-06 16:13:17.437497411 -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/number_field/totallyreal.pyx.orig src/sage/rings/number_field/totallyreal.pyx --- src/sage/rings/number_field/totallyreal.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/number_field/totallyreal.pyx 2020-07-06 16:13:17.438497411 -0600 @@ -1,4 +1,4 @@ -""" +r""" Enumeration of Primitive Totally Real Fields This module contains functions for enumerating all primitive diff -up src/sage/rings/padics/CA_template.pxi.orig src/sage/rings/padics/CA_template.pxi --- src/sage/rings/padics/CA_template.pxi.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/CA_template.pxi 2020-07-06 16:13:17.439497410 -0600 @@ -392,7 +392,7 @@ cdef class CAElement(pAdicTemplateElemen def __pow__(CAElement self, _right, dummy): - """ + r""" Exponentiation. When ``right`` is divisible by `p` then one can get more @@ -521,7 +521,7 @@ cdef class CAElement(pAdicTemplateElemen return ans cdef pAdicTemplateElement _lshift_c(self, long shift): - """ + r""" Multiplies by `\pi^{\mbox{shift}}`. Negative shifts may truncate the result. @@ -553,7 +553,7 @@ cdef class CAElement(pAdicTemplateElemen return ans cdef pAdicTemplateElement _rshift_c(self, long shift): - """ + r""" Divides by ``π^{\mbox{shift}}``. Positive shifts may truncate the result. @@ -1611,7 +1611,7 @@ cdef class pAdicCoercion_CA_frac_field(R cdef class pAdicConvert_CA_frac_field(Morphism): - """ + r""" The section of the inclusion from `\ZZ_q`` to its fraction field. EXAMPLES:: diff -up src/sage/rings/padics/CR_template.pxi.orig src/sage/rings/padics/CR_template.pxi --- src/sage/rings/padics/CR_template.pxi.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/CR_template.pxi 2020-07-06 16:13:17.440497410 -0600 @@ -720,7 +720,7 @@ cdef class CRElement(pAdicTemplateElemen return ans cdef pAdicTemplateElement _lshift_c(self, long shift): - """ + r""" Multiplies by `\pi^{\mbox{shift}}`. Negative shifts may truncate the result if the parent is not a @@ -751,7 +751,7 @@ cdef class CRElement(pAdicTemplateElemen return ans cdef pAdicTemplateElement _rshift_c(self, long shift): - """ + r""" Divides by ``\pi^{\mbox{shift}}``. Positive shifts may truncate the result if the parent is not a @@ -2338,7 +2338,7 @@ cdef class pAdicCoercion_CR_frac_field(R cdef class pAdicConvert_CR_frac_field(Morphism): - """ + r""" The section of the inclusion from `\ZZ_q`` to its fraction field. EXAMPLES:: diff -up src/sage/rings/padics/FM_template.pxi.orig src/sage/rings/padics/FM_template.pxi --- src/sage/rings/padics/FM_template.pxi.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/FM_template.pxi 2020-07-06 16:13:17.441497410 -0600 @@ -381,7 +381,7 @@ cdef class FMElement(pAdicTemplateElemen return ans cdef pAdicTemplateElement _lshift_c(self, long shift): - """ + r""" Multiplies self by `\pi^{shift}`. If shift < -self.valuation(), digits will be truncated. See @@ -428,7 +428,7 @@ cdef class FMElement(pAdicTemplateElemen return ans cdef pAdicTemplateElement _rshift_c(self, long shift): - """ + r""" Divides by `\pi^{shift}`, and truncates. Note that this operation will insert arbitrary digits (in @@ -462,7 +462,7 @@ cdef class FMElement(pAdicTemplateElemen return ans def add_bigoh(self, absprec): - """ + r""" Returns a new element truncated modulo `\pi^{\mbox{absprec}}`. INPUT: diff -up src/sage/rings/padics/FP_template.pxi.orig src/sage/rings/padics/FP_template.pxi --- src/sage/rings/padics/FP_template.pxi.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/FP_template.pxi 2020-07-06 16:13:17.442497410 -0600 @@ -653,7 +653,7 @@ cdef class FPElement(pAdicTemplateElemen return ans cdef pAdicTemplateElement _lshift_c(self, long shift): - """ + r""" Multiplies self by `\pi^{shift}`. Negative shifts may truncate the result if the parent is not a @@ -706,7 +706,7 @@ cdef class FPElement(pAdicTemplateElemen return ans cdef pAdicTemplateElement _rshift_c(self, long shift): - """ + r""" Divides by `\pi^{shift}`. Positive shifts may truncate the result if the parent is not a @@ -782,7 +782,7 @@ cdef class FPElement(pAdicTemplateElemen return self.parent()._printer.repr_gen(self, do_latex, mode=mode) def add_bigoh(self, absprec): - """ + r""" Returns a new element truncated modulo `\pi^{\mbox{absprec}}`. INPUT: 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/local_generic_element.pyx 2020-07-06 16:13:17.443497410 -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/morphism.pyx.orig src/sage/rings/padics/morphism.pyx --- src/sage/rings/padics/morphism.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/morphism.pyx 2020-07-06 16:13:17.443497410 -0600 @@ -280,7 +280,7 @@ cdef class FrobeniusEndomorphism_padics( def __hash__(self): - """ + r""" Return a hash of this morphism. It is the hash of ``(domain, codomain, ('Frob', power)`` 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_capped_absolute_element.pyx 2020-07-06 16:13:17.444497410 -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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_capped_relative_element.pyx 2020-07-06 16:13:17.445497410 -0600 @@ -250,7 +250,7 @@ cdef class pAdicCappedRelativeElement(CR return self.lift_c() def residue(self, absprec=1, field=None, check_prec=True): - """ + r""" Reduces this element modulo `p^{\mathrm{absprec}}`. INPUT: @@ -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_ext_element.pyx.orig src/sage/rings/padics/padic_ext_element.pyx --- src/sage/rings/padics/padic_ext_element.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_ext_element.pyx 2020-07-06 16:13:17.445497410 -0600 @@ -1,4 +1,4 @@ -""" +r""" p-Adic Extension Element A common superclass for all elements of extension rings and field of `\ZZ_p` and 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_fixed_mod_element.pyx 2020-07-06 16:13:17.446497410 -0600 @@ -157,7 +157,7 @@ cdef class pAdicFixedModElement(FMElemen return self.lift_c() cdef lift_c(self): - """ + r""" Returns an integer congruent to this element modulo the precision. .. WARNING:: @@ -227,7 +227,7 @@ cdef class pAdicFixedModElement(FMElemen holder.value) def _integer_(self, Z=None): - """ + r""" Return an integer congruent to ``self`` modulo the precision. .. WARNING:: @@ -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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_floating_point_element.pyx 2020-07-06 16:13:17.447497410 -0600 @@ -238,7 +238,7 @@ cdef class pAdicFloatingPointElement(FPE return self.lift_c() def residue(self, absprec=1, field=None, check_prec=False): - """ + r""" Reduces this element modulo `p^{\mathrm{absprec}}`. INPUT: @@ -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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_generic_element.pyx 2020-07-06 16:13:17.449497409 -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`. @@ -3746,7 +3746,7 @@ cdef class pAdicGenericElement(LocalGene return parent(root) def _inverse_pth_root(self, twist=None, hint=None): - """ + r""" In its simplest form, computes the inverse of ``p``-th root of this element. @@ -4089,7 +4089,7 @@ cdef class pAdicGenericElement(LocalGene return (H[n](z - 1) - ((z.log(0))**(n-1)*(1 - z).log(0))/Integer(n-1).factorial()).add_bigoh(N) def polylog(self, n): - """ + r""" Return `Li_n(self)` , the `n`th `p`-adic polylogarithm of this element. INPUT: @@ -4342,7 +4342,7 @@ def _polylog_c(n, p): return p/(p-1) - (n-1)/p.log() + (n-1)*(n*(p-1)/p.log()).log(p) + (2*p*(p-1)*n/p.log()).log(p) def _findprec(c_1, c_2, c_3, p): - """ + r""" Return an integer k such that c_1*k - c_2*log_p(k) > c_3. This is an internal function, used by :meth:`polylog`. @@ -4372,7 +4372,7 @@ def _findprec(c_1, c_2, c_3, p): k += 1 def _compute_g(p, n, prec, terms): - """ + r""" Return the list of power series `g_i = \int(-g_{i-1}/(v-v^2))` used in the computation of polylogarithms. This is an internal function, used by :meth:`polylog`. diff -up src/sage/rings/padics/padic_template_element.pxi.orig src/sage/rings/padics/padic_template_element.pxi --- src/sage/rings/padics/padic_template_element.pxi.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_template_element.pxi 2020-07-06 16:13:17.449497409 -0600 @@ -612,7 +612,7 @@ cdef class pAdicTemplateElement(pAdicGen return trim_zeros(list(self.unit_part().expansion(lift_mode='smallest'))) cpdef pAdicTemplateElement unit_part(self): - """ + r""" Returns the unit part of this element. This is the `p`-adic element `u` in the same ring so that this diff -up src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx.orig src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx --- src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx 2020-07-06 16:13:17.450497409 -0600 @@ -1,4 +1,4 @@ -""" +r""" `p`-Adic ``ZZ_pX`` CA Element This file implements elements of Eisenstein and unramified extensions @@ -1539,7 +1539,7 @@ cdef class pAdicZZpXCAElement(pAdicZZpXE return self.to_fraction_field() * (~right) def _integer_(self, Z=None): - """ + r""" Returns an integer congruent to this element modulo `\pi`^``self.absolute_precision()``, if possible. @@ -1935,7 +1935,7 @@ cdef class pAdicZZpXCAElement(pAdicZZpXE return [zero] * ordp + ulist 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 *rows* of this matrix give the diff -up src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx.orig src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx --- src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx 2020-07-06 16:13:17.452497409 -0600 @@ -1,4 +1,4 @@ -""" +r""" `p`-Adic ``ZZ_pX`` CR Element This file implements elements of Eisenstein and unramified extensions @@ -224,7 +224,7 @@ cdef inline int check_ordp(long a) excep cdef class pAdicZZpXCRElement(pAdicZZpXElement): def __init__(self, parent, x, absprec = infinity, relprec = infinity, empty = False): - """ + r""" Creates an element of a capped relative precision, unramified or Eisenstein extension of `\ZZ_p` or `\QQ_p`. @@ -2298,7 +2298,7 @@ cdef class pAdicZZpXCRElement(pAdicZZpXE return ans def _integer_(self, Z=None): - """ + r""" Return an integer congruent to this element modulo `\pi`^``self.absolute_precision()``, if possible @@ -2796,7 +2796,7 @@ cdef class pAdicZZpXCRElement(pAdicZZpXE return ulist def matrix_mod_pn(self): - """ + r""" Return 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 *rows* of this matrix give the diff -up src/sage/rings/padics/padic_ZZ_pX_element.pyx.orig src/sage/rings/padics/padic_ZZ_pX_element.pyx --- src/sage/rings/padics/padic_ZZ_pX_element.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_ZZ_pX_element.pyx 2020-07-06 16:13:17.453497409 -0600 @@ -344,7 +344,7 @@ cdef class pAdicZZpXElement(pAdicExtElem return ans def norm(self, base=None): - """ + r""" Return the absolute or relative norm of this element. NOTE! This is not the `p`-adic absolute value. This is a @@ -420,7 +420,7 @@ cdef class pAdicZZpXElement(pAdicExtElem return self.parent().ground_ring()(self.unit_part().matrix_mod_pn().det()) * norm_of_uniformizer**self.valuation() def trace(self, base = None): - """ + r""" Return the absolute or relative trace of this element. If ``base`` is given then ``base`` must be a subfield of the 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx 2020-07-06 16:13:17.454497409 -0600 @@ -1,4 +1,4 @@ -""" +r""" `p`-Adic ``ZZ_pX`` FM Element This file implements elements of Eisenstein and unramified extensions @@ -149,7 +149,7 @@ from sage.rings.padics.pow_computer_ext cdef class pAdicZZpXFMElement(pAdicZZpXElement): def __init__(self, parent, x, absprec=None, relprec=None, empty=False): - """ + r""" Creates an element of a fixed modulus, unramified or eisenstein extension of `\ZZ_p` or `\QQ_p`. @@ -902,7 +902,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 @@ -949,7 +949,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE return ans def _integer_(self, Z=None): - """ + r""" Returns an integer congruent to this element modulo `\pi` ^ ``self.absolute_precision()``, if possible. @@ -980,7 +980,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 @@ -1041,7 +1041,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE # raise NotImplementedError def norm(self, base = None): - """ + r""" Return the absolute or relative norm of this element. NOTE! This is not the `p`-adic absolute value. This is a @@ -1078,7 +1078,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE return self.parent().ground_ring()(self.unit_part().matrix_mod_pn().det()) * norm_of_uniformizer**self.valuation() def trace(self, base = None): - """ + r""" Return the absolute or relative trace of this element. If `K` is given then `K` must be a subfield of the parent `L` of diff -up src/sage/rings/padics/pow_computer_ext.pyx.orig src/sage/rings/padics/pow_computer_ext.pyx --- src/sage/rings/padics/pow_computer_ext.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/pow_computer_ext.pyx 2020-07-06 16:13:17.456497408 -0600 @@ -1248,7 +1248,7 @@ cdef class PowComputer_ZZ_pX(PowComputer return 0 cdef class PowComputer_ZZ_pX_FM(PowComputer_ZZ_pX): - """ + r""" This class only caches a context and modulus for p^prec_cap. Designed for use with fixed modulus p-adic rings, in Eisenstein diff -up src/sage/rings/padics/qadic_flint_CA.pyx.orig src/sage/rings/padics/qadic_flint_CA.pyx --- src/sage/rings/padics/qadic_flint_CA.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/qadic_flint_CA.pyx 2020-07-06 16:13:17.456497408 -0600 @@ -27,7 +27,7 @@ cdef class qAdicCappedAbsoluteElement(CA norm = norm_unram 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 *rows* of this matrix give the diff -up src/sage/rings/padics/qadic_flint_CR.pyx.orig src/sage/rings/padics/qadic_flint_CR.pyx --- src/sage/rings/padics/qadic_flint_CR.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/qadic_flint_CR.pyx 2020-07-06 16:13:17.457497409 -0600 @@ -27,7 +27,7 @@ cdef class qAdicCappedRelativeElement(CR norm = norm_unram 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 *rows* of this matrix give the diff -up src/sage/rings/padics/qadic_flint_FM.pyx.orig src/sage/rings/padics/qadic_flint_FM.pyx --- src/sage/rings/padics/qadic_flint_FM.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/qadic_flint_FM.pyx 2020-07-06 16:13:17.457497409 -0600 @@ -27,7 +27,7 @@ cdef class qAdicFixedModElement(FMElemen norm = norm_unram 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 *rows* of this matrix give the diff -up src/sage/rings/padics/qadic_flint_FP.pyx.orig src/sage/rings/padics/qadic_flint_FP.pyx --- src/sage/rings/padics/qadic_flint_FP.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/padics/qadic_flint_FP.pyx 2020-07-06 16:13:17.458497408 -0600 @@ -27,7 +27,7 @@ cdef class qAdicFloatingPointElement(FPE norm = norm_unram 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 *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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/cyclotomic.pyx 2020-07-06 16:13:17.459497408 -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/laurent_polynomial.pyx.orig src/sage/rings/polynomial/laurent_polynomial.pyx --- src/sage/rings/polynomial/laurent_polynomial.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/laurent_polynomial.pyx 2020-07-06 16:13:17.459497408 -0600 @@ -238,7 +238,7 @@ cdef class LaurentPolynomial(Commutative cdef class LaurentPolynomial_univariate(LaurentPolynomial): - """ + r""" A univariate Laurent polynomial in the form of `t^n \cdot f` where `f` is a polynomial in `t`. 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/multi_polynomial_libsingular.pyx 2020-07-06 16:15:53.639480160 -0600 @@ -2036,7 +2036,7 @@ cdef class MPolynomial_libsingular(MPoly return new_MP(P, _p) def __call__(self, *x, **kwds): - """ + r""" Evaluate this multi-variate polynomial at ``x``, where ``x`` is either the tuple of values to substitute in, or one can use functional notation ``f(a_0,a_1,a_2, \ldots)`` to evaluate @@ -2305,7 +2305,7 @@ cdef class MPolynomial_libsingular(MPoly return new_MP((left)._parent,_p) cpdef _div_(left, right_ringelement): - """ + r""" Divide left by right EXAMPLES:: @@ -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:: @@ -4489,7 +4489,7 @@ cdef class MPolynomial_libsingular(MPoly return Sequence(l, check=False, immutable=True) def reduce(self,I): - """ + r""" Return a remainder of this polynomial modulo the polynomials in ``I``. @@ -5205,7 +5205,7 @@ cdef class MPolynomial_libsingular(MPoly return new_MP(self._parent,p) def integral(self, MPolynomial_libsingular var): - """ + r""" Integrates this polynomial with respect to the provided variable. diff -up src/sage/rings/polynomial/multi_polynomial.pyx.orig src/sage/rings/polynomial/multi_polynomial.pyx --- src/sage/rings/polynomial/multi_polynomial.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/multi_polynomial.pyx 2020-07-06 16:13:17.462497408 -0600 @@ -209,7 +209,7 @@ cdef class MPolynomial(CommutativeRingEl return R([self]) def coefficients(self): - """ + r""" Return the nonzero coefficients of this polynomial in a list. The returned list is decreasingly ordered by the term ordering of ``self.parent()``, i.e. the list of coefficients matches the list @@ -1307,7 +1307,7 @@ cdef class MPolynomial(CommutativeRingEl return R(dict([(k,f(v)) for (k,v) in self.dict().items()])) def _norm_over_nonprime_finite_field(self): - """ + r""" Given a multivariate polynomial over a nonprime finite field `\GF{p**e}`, compute the norm of the polynomial down to `\GF{p}`, which is the product of the conjugates by the Frobenius action on diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbori.pyx --- src/sage/rings/polynomial/pbori.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/pbori.pyx 2020-07-06 16:13:17.464497408 -0600 @@ -1362,7 +1362,7 @@ cdef class BooleanPolynomialRing(MPolyno return R def defining_ideal(self): - """ + r""" Return `I = \subset R` where ``R = self.cover_ring()``, and `x_i` any element in the set of variables of this ring. diff -up src/sage/rings/polynomial/plural.pyx.orig src/sage/rings/polynomial/plural.pyx --- src/sage/rings/polynomial/plural.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/plural.pyx 2020-07-06 16:13:17.464497408 -0600 @@ -250,7 +250,7 @@ cdef class NCPolynomialRing_plural(Ring) """ def __init__(self, base_ring, names, c, d, order, category, check=True): - """ + r""" Construct a noncommutative polynomial G-algebra subject to the following conditions: INPUT: 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/polynomial_element.pyx 2020-07-06 16:13:17.467497407 -0600 @@ -2657,8 +2657,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" @@ -2758,7 +2758,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 @@ -4832,7 +4832,7 @@ cdef class Polynomial(CommutativeAlgebra return ~(q.leading_coefficient())*q # make monic (~ is inverse in python) def is_primitive(self, n=None, n_prime_divs=None): - """ + r""" Return ``True`` if the polynomial is primitive. The semantics of "primitive" depend on the polynomial coefficients. @@ -6422,8 +6422,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_gf2x.pyx.orig src/sage/rings/polynomial/polynomial_gf2x.pyx --- src/sage/rings/polynomial/polynomial_gf2x.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/polynomial_gf2x.pyx 2020-07-06 16:13:17.467497407 -0600 @@ -101,7 +101,7 @@ cdef class Polynomial_GF2X(Polynomial_te return pari(self.list()).Polrev(variable) * pari(1).Mod(2) def modular_composition(Polynomial_GF2X self, Polynomial_GF2X g, Polynomial_GF2X h, algorithm=None): - """ + r""" Compute `f(g) \pmod h`. Both implementations use Brent-Kung's Algorithm 2.1 (*Fast Algorithms 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx 2020-07-06 16:17:41.007468317 -0600 @@ -1,4 +1,4 @@ -""" +r""" Dense univariate polynomials over `\ZZ`, implemented using FLINT AUTHORS: @@ -1350,7 +1350,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/polynomial_modn_dense_ntl.pyx.orig src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx --- src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx 2020-07-07 08:59:06.556863458 -0600 @@ -1,4 +1,4 @@ -""" +r""" Dense univariate polynomials over `\ZZ/n\ZZ`, implemented using NTL This implementation is generally slower than the FLINT implementation in diff -up src/sage/rings/polynomial/polynomial_zmod_flint.pyx.orig src/sage/rings/polynomial/polynomial_zmod_flint.pyx --- src/sage/rings/polynomial/polynomial_zmod_flint.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/polynomial_zmod_flint.pyx 2020-07-07 08:59:06.557863457 -0600 @@ -1,4 +1,4 @@ -""" +r""" Dense univariate polynomials over `\ZZ/n\ZZ`, implemented using FLINT This module gives a fast implementation of `(\ZZ/n\ZZ)[x]` whenever `n` is at 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/real_roots.pyx 2020-07-06 16:13:17.470497407 -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/polynomial/skew_polynomial_element.pyx.orig src/sage/rings/polynomial/skew_polynomial_element.pyx --- src/sage/rings/polynomial/skew_polynomial_element.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/skew_polynomial_element.pyx 2020-07-06 16:13:17.470497407 -0600 @@ -1650,8 +1650,8 @@ cdef class SkewPolynomial(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/symmetric_reduction.pyx.orig src/sage/rings/polynomial/symmetric_reduction.pyx --- src/sage/rings/polynomial/symmetric_reduction.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/polynomial/symmetric_reduction.pyx 2020-07-06 16:13:17.471497407 -0600 @@ -1,4 +1,4 @@ -""" +r""" Symmetric Reduction of Infinite Polynomials :class:`~sage.rings.polynomial.symmetric_reduction.SymmetricReductionStrategy` diff -up src/sage/rings/rational.pyx.orig src/sage/rings/rational.pyx --- src/sage/rings/rational.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/rational.pyx 2020-07-06 16:19:17.718457638 -0600 @@ -1719,7 +1719,7 @@ cdef class Rational(sage.structure.eleme return self.numer().squarefree_part() * self.denom().squarefree_part() def is_padic_square(self, p, check=True): - """ + r""" Determines whether this rational number is a square in `\QQ_p` (or in `R` when ``p = infinity``). diff -up src/sage/rings/real_arb.pyx.orig src/sage/rings/real_arb.pyx --- src/sage/rings/real_arb.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/real_arb.pyx 2020-07-06 16:19:17.718457638 -0600 @@ -235,7 +235,7 @@ from sage.structure.unique_representatio from sage.cpython.string cimport char_to_str, str_to_bytes cdef void mpfi_to_arb(arb_t target, const mpfi_t source, const long precision): - """ + r""" Convert an MPFI interval to an Arb ball. INPUT: @@ -279,7 +279,7 @@ cdef void mpfi_to_arb(arb_t target, cons mpfr_clear(right) cdef int arb_to_mpfi(mpfi_t target, arb_t source, const long precision) except -1: - """ + r""" Convert an Arb ball to an MPFI interval. INPUT: @@ -772,7 +772,7 @@ class RealBallField(UniqueRepresentation # Ball functions of non-ball arguments def sinpi(self, x): - """ + r""" Return a ball enclosing `\sin(\pi x)`. This works even if ``x`` itself is not a ball, and may be faster or @@ -818,7 +818,7 @@ class RealBallField(UniqueRepresentation return res def cospi(self, x): - """ + r""" Return a ball enclosing `\cos(\pi x)`. This works even if ``x`` itself is not a ball, and may be faster or @@ -2913,7 +2913,7 @@ cdef class RealBall(RingElement): return res def sqrt1pm1(self): - """ + r""" Return `\sqrt{1+\mathrm{self}}-1`, computed accurately when ``self`` is close to zero. @@ -3494,7 +3494,7 @@ cdef class RealBall(RingElement): return res def rising_factorial(self, n): - """ + r""" Return the ``n``-th rising factorial of this ball. The `n`-th rising factorial of `x` is equal to `x (x+1) \cdots (x+n-1)`. @@ -3596,7 +3596,7 @@ cdef class RealBall(RingElement): return res def polylog(self, s): - """ + r""" Return the polylogarithm `\operatorname{Li}_s(\mathrm{self})`. EXAMPLES:: diff -up src/sage/rings/real_double.pyx.orig src/sage/rings/real_double.pyx --- src/sage/rings/real_double.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/real_double.pyx 2020-07-06 16:19:17.719457638 -0600 @@ -2079,7 +2079,7 @@ cdef class RealDoubleElement(FieldElemen return a def log(self, base=None): - """ + r""" Return the logarithm. INPUT: @@ -2255,7 +2255,7 @@ cdef class RealDoubleElement(FieldElemen return a def exp2(self): - """ + r""" Return `2^\mathtt{self}`. EXAMPLES:: diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx --- src/sage/rings/real_mpfi.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/real_mpfi.pyx 2020-07-06 16:19:17.719457638 -0600 @@ -1307,7 +1307,7 @@ cdef class RealIntervalFieldElement(Ring return self.str(10) def _latex_(self): - """ + r""" Return a latex representation of ``self``. EXAMPLES:: @@ -4407,7 +4407,7 @@ cdef class RealIntervalFieldElement(Ring return x def exp2(self): - """ + r""" Returns `2^\mathtt{self}` EXAMPLES:: diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx --- src/sage/rings/real_mpfr.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/real_mpfr.pyx 2020-07-06 16:19:17.720457638 -0600 @@ -3915,7 +3915,7 @@ cdef class RealNumber(sage.structure.ele return mpfr_inf_p(self.value) and mpfr_sgn(self.value) < 0 def is_infinity(self): - """ + r""" Return ``True`` if ``self`` is `\infty` and ``False`` otherwise. 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/semirings/tropical_semiring.pyx 2020-07-06 16:19:17.721457638 -0600 @@ -99,7 +99,7 @@ cdef class TropicalSemiringElement(Eleme return repr(self._val) def _latex_(self): - """ + r""" Return a latex representation of ``self``. EXAMPLES:: @@ -135,7 +135,7 @@ cdef class TropicalSemiringElement(Eleme # Comparisons cpdef _richcmp_(left, right, int op): - """ + r""" Return the standard comparison of ``left`` and ``right``. EXAMPLES:: @@ -259,7 +259,7 @@ cdef class TropicalSemiringElement(Eleme return x def __neg__(self): - """ + r""" Return the additive inverse, which only exists for `\infty`. EXAMPLES:: @@ -610,7 +610,7 @@ class TropicalSemiring(Parent, UniqueRep @cached_method def zero(self): - """ + r""" Return the (tropical) additive identity element `+\infty`. 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-05-20 16:33:41.000000000 -0600 +++ src/sage/rings/tate_algebra_element.pyx 2020-07-06 16:19:17.721457638 -0600 @@ -1522,7 +1522,7 @@ cdef class TateAlgebraElement(Commutativ return True def __pow__(self, exponent, modulus): - """ + r""" Return this element raised to the power ``exponent``. INPUT: @@ -2507,7 +2507,7 @@ cdef class TateAlgebraElement(Commutativ return self._prec - self.valuation() def log(self, prec=None): - """ + r""" Return the logarithm of this series. INPUT: @@ -2664,7 +2664,7 @@ cdef class TateAlgebraElement(Commutativ return total.add_bigoh(aprec) def exp(self, prec=None): - """ + r""" Return the exponential of this series. INPUT: @@ -3417,7 +3417,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-05-20 16:33:41.000000000 -0600 +++ src/sage/structure/coerce_maps.pyx 2020-07-06 16:19:17.721457638 -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-05-20 16:33:41.000000000 -0600 +++ src/sage/symbolic/expression.pyx 2020-07-06 16:22:36.515435688 -0600 @@ -3675,7 +3675,7 @@ cdef class Expression(CommutativeRingEle return 1/self cpdef int _cmp_(left, right) except -2: - """ + r""" Compare self and right, returning -1, 0, or 1, depending on if self < right, self == right, or self > right, respectively. @@ -4788,7 +4788,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. @@ -7308,7 +7308,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-05-20 16:33:41.000000000 -0600 +++ src/sage/symbolic/function.pyx 2020-07-06 16:20:02.591452688 -0600 @@ -1565,7 +1565,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-05-20 16:33:41.000000000 -0600 +++ src/sage/symbolic/ring.pyx 2020-07-06 16:20:02.592452688 -0600 @@ -86,7 +86,7 @@ cdef class SymbolicRing(CommutativeRing) return "Symbolic Ring" def _latex_(self): - """ + r""" Return latex representation of the symbolic ring. EXAMPLES:: @@ -473,7 +473,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: @@ -725,7 +725,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: diff -up src/sage/symbolic/series.pyx.orig src/sage/symbolic/series.pyx --- src/sage/symbolic/series.pyx.orig 2020-05-20 16:33:41.000000000 -0600 +++ src/sage/symbolic/series.pyx 2020-07-06 16:20:02.593452688 -0600 @@ -1,4 +1,4 @@ -""" +r""" Symbolic Series Symbolic series are special kinds of symbolic expressions that are