mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 03:39:03 -04:00
Also: - Drop upstreamed -ecm and -primecount patches. - Add -escape patch. - The old notebook (sagenb) is no longer shipped, so drop the -sagenb and -sagenb-python3 patches, the -notebook subpackage, and some BRs. - New -jupyter subpackage. - Add suitesparse BR. - Drop pathlib2 BR (bz 1797116).
3536 lines
139 KiB
Diff
3536 lines
139 KiB
Diff
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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx 2020-02-27 12:06:28.748195247 -0700
|
|
@@ -228,7 +228,7 @@ cdef class FreeAlgebraElement_letterplac
|
|
return '0'
|
|
|
|
def _latex_(self):
|
|
- """
|
|
+ r"""
|
|
TESTS::
|
|
|
|
sage: K.<z> = 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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/algebras/letterplace/free_algebra_letterplace.pyx 2020-02-27 12:07:22.658260237 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/algebras/lie_algebras/lie_algebra_element.pyx 2020-02-27 12:05:08.435588192 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/arith/multi_modular.pyx 2020-02-27 13:55:34.962395106 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/calculus/transforms/dwt.pyx 2020-02-27 11:58:48.129134391 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/coding/binary_code.pyx 2020-02-27 09:13:10.902461428 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/coding/codecan/codecan.pyx 2020-02-27 09:11:00.997860689 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/combinat/crystals/letters.pyx 2020-02-27 13:38:25.079626805 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/combinat/crystals/tensor_product_element.pyx 2020-02-27 13:42:53.490900825 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/combinat/integer_lists/base.pyx 2020-02-27 10:03:04.700544965 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/combinat/root_system/reflection_group_c.pyx 2020-02-27 13:46:22.841188756 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/combinat/root_system/reflection_group_element.pyx 2020-02-27 10:05:47.567686763 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/crypto/boolean_function.pyx 2020-02-27 09:07:31.088625609 -0700
|
|
@@ -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<<nvars for i in range(1, 1<<nvars))
|
|
|
|
def linear_structures(self):
|
|
- """
|
|
+ r"""
|
|
Return all linear structures of this Boolean function as a vector subspace
|
|
of `\GF{2}^n`.
|
|
|
|
@@ -1240,7 +1240,7 @@ cdef class BooleanFunction(SageObject):
|
|
return V.subspace(l)
|
|
|
|
def derivative(self, u):
|
|
- """
|
|
+ r"""
|
|
Return the derivative in direction of ``u``
|
|
|
|
INPUT:
|
|
diff -up src/sage/functions/prime_pi.pyx.orig src/sage/functions/prime_pi.pyx
|
|
--- src/sage/functions/prime_pi.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/functions/prime_pi.pyx 2020-02-27 13:57:13.458578944 -0700
|
|
@@ -1,4 +1,4 @@
|
|
-"""
|
|
+r"""
|
|
Counting Primes
|
|
|
|
AUTHORS:
|
|
diff -up src/sage/geometry/integral_points.pyx.orig src/sage/geometry/integral_points.pyx
|
|
--- src/sage/geometry/integral_points.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/geometry/integral_points.pyx 2020-02-27 14:58:09.110842685 -0700
|
|
@@ -726,7 +726,7 @@ cdef loop_over_rectangular_box_points_sa
|
|
|
|
|
|
cdef class Inequality_generic:
|
|
- """
|
|
+ r"""
|
|
An inequality whose coefficients are arbitrary Python/Sage objects
|
|
|
|
INPUT:
|
|
@@ -839,7 +839,7 @@ cdef class Inequality_generic:
|
|
DEF INEQ_INT_MAX_DIM = 20
|
|
|
|
cdef class Inequality_int:
|
|
- """
|
|
+ r"""
|
|
Fast version of inequality in the case that all coefficients fit
|
|
into machine ints.
|
|
|
|
diff -up src/sage/graphs/asteroidal_triples.pyx.orig src/sage/graphs/asteroidal_triples.pyx
|
|
--- src/sage/graphs/asteroidal_triples.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/graphs/asteroidal_triples.pyx 2020-02-27 09:53:16.680674877 -0700
|
|
@@ -185,7 +185,7 @@ cdef list is_asteroidal_triple_free_C(ui
|
|
uint32_t** connected_structure,
|
|
uint32_t* waiting_list,
|
|
bitset_t seen):
|
|
- """
|
|
+ r"""
|
|
INPUT:
|
|
|
|
- ``n`` -- integer; number of points in the graph
|
|
diff -up src/sage/graphs/graph_decompositions/vertex_separation.pyx.orig src/sage/graphs/graph_decompositions/vertex_separation.pyx
|
|
--- src/sage/graphs/graph_decompositions/vertex_separation.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/graphs/graph_decompositions/vertex_separation.pyx 2020-02-27 09:45:33.735327813 -0700
|
|
@@ -472,7 +472,7 @@ def linear_ordering_to_path_decompositio
|
|
|
|
def pathwidth(self, k=None, certificate=False, algorithm="BAB", verbose=False,
|
|
max_prefix_length=20, max_prefix_number=10**6):
|
|
- """
|
|
+ r"""
|
|
Compute the pathwidth of ``self`` (and provides a decomposition)
|
|
|
|
INPUT:
|
|
diff -up src/sage/graphs/hyperbolicity.pyx.orig src/sage/graphs/hyperbolicity.pyx
|
|
--- src/sage/graphs/hyperbolicity.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/graphs/hyperbolicity.pyx 2020-02-27 09:40:41.823526940 -0700
|
|
@@ -585,7 +585,7 @@ cdef tuple hyperbolicity_BCCM(int N,
|
|
float approximation_factor,
|
|
float additive_gap,
|
|
verbose=False):
|
|
- """
|
|
+ r"""
|
|
Return the hyperbolicity of a graph.
|
|
|
|
This method implements the exact and the approximate algorithms proposed in
|
|
@@ -841,7 +841,7 @@ cdef tuple hyperbolicity_CCL(int N,
|
|
float approximation_factor,
|
|
float additive_gap,
|
|
verbose=False):
|
|
- """
|
|
+ r"""
|
|
Return the hyperbolicity of a graph.
|
|
|
|
This method implements the exact and the approximate algorithms proposed in
|
|
diff -up src/sage/graphs/matchpoly.pyx.orig src/sage/graphs/matchpoly.pyx
|
|
--- src/sage/graphs/matchpoly.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/graphs/matchpoly.pyx 2020-02-27 12:33:20.595046387 -0700
|
|
@@ -50,7 +50,7 @@ x = polygen(ZZ, 'x')
|
|
|
|
|
|
def matching_polynomial(G, complement=True, name=None):
|
|
- """
|
|
+ r"""
|
|
Computes the matching polynomial of the graph `G`.
|
|
|
|
If `p(G, k)` denotes the number of `k`-matchings (matchings with `k` edges)
|
|
diff -up src/sage/graphs/strongly_regular_db.pyx.orig src/sage/graphs/strongly_regular_db.pyx
|
|
--- src/sage/graphs/strongly_regular_db.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/graphs/strongly_regular_db.pyx 2020-02-27 09:51:17.877812212 -0700
|
|
@@ -2391,7 +2391,7 @@ def strongly_regular_from_two_intersecti
|
|
|
|
A set of points in the projective geometry `PG(k,q)` is said to be a
|
|
2-intersection set if it intersects every hyperplane in either `h_1` or
|
|
- `h_2` points, where `h_1,h_2\in \\NN`.
|
|
+ `h_2` points, where `h_1,h_2\in \NN`.
|
|
|
|
From a 2-intersection set `S` can be defined a strongly-regular graph in the
|
|
following way:
|
|
diff -up src/sage/groups/group.pyx.orig src/sage/groups/group.pyx
|
|
--- src/sage/groups/group.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/groups/group.pyx 2020-02-27 11:36:32.459309482 -0700
|
|
@@ -50,7 +50,7 @@ def is_Group(x):
|
|
|
|
|
|
cdef class Group(Parent):
|
|
- """
|
|
+ r"""
|
|
Base class for all groups
|
|
|
|
TESTS::
|
|
@@ -189,7 +189,7 @@ cdef class Group(Parent):
|
|
return self.order() != infinity
|
|
|
|
def is_multiplicative(self):
|
|
- """
|
|
+ r"""
|
|
Returns True if the group operation is given by \* (rather than
|
|
+).
|
|
|
|
diff -up src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx
|
|
--- src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx 2020-02-27 08:42:25.623470890 -0700
|
|
@@ -913,7 +913,7 @@ cdef class PartitionRefinement_generic:
|
|
"\\begin{tikzpicture}\n" +
|
|
"\\tikzset{level distance=3cm, edge from parent/.style=" +
|
|
"{draw, edge from parent path={(\\tikzparentnode.south) -- (\\tikzchildnode.north)}}}\n" +
|
|
- "\Tree")
|
|
+ "\\Tree")
|
|
self._latex_debug_string += "[."
|
|
self._latex_act_node()
|
|
|
|
diff -up src/sage/groups/perm_gps/partn_ref/data_structures.pyx.orig src/sage/groups/perm_gps/partn_ref/data_structures.pyx
|
|
--- src/sage/groups/perm_gps/partn_ref/data_structures.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/groups/perm_gps/partn_ref/data_structures.pyx 2020-02-27 11:31:41.434392986 -0700
|
|
@@ -828,11 +828,11 @@ cdef SC_print_level(StabilizerChain *SC,
|
|
print('| labels {}'.format([SC.labels [level][i] for i from 0 <= i < n]))
|
|
print('|')
|
|
print('| generators {}'.format([[SC.generators [level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]]))
|
|
- print('\ inverses {}'.format([[SC.gen_inverses[level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]]))
|
|
+ print('\\ inverses {}'.format([[SC.gen_inverses[level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]]))
|
|
else:
|
|
print('/ level {}'.format(level))
|
|
print('|')
|
|
- print('\ base_size {}'.format(SC.base_size))
|
|
+ print('\\ base_size {}'.format(SC.base_size))
|
|
|
|
cdef StabilizerChain *SC_new_base(StabilizerChain *SC, int *base, int base_len):
|
|
"""
|
|
diff -up src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx.orig src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx
|
|
--- src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx 2020-02-27 11:30:07.172039526 -0700
|
|
@@ -105,7 +105,7 @@ cdef class LinearBinaryCodeStruct(Binary
|
|
self.ith_word = &ith_word_linear
|
|
|
|
def run(self, partition=None):
|
|
- """
|
|
+ r"""
|
|
Perform the canonical labeling and automorphism group computation,
|
|
storing results to self.
|
|
|
|
@@ -607,7 +607,7 @@ cdef int ith_word_nonlinear(BinaryCodeSt
|
|
return 0
|
|
|
|
cdef int refine_by_bip_degree(PartitionStack *col_ps, void *S, int *cells_to_refine_by, int ctrb_len):
|
|
- """
|
|
+ r"""
|
|
Refines the input partition by checking degrees of vertices to the given
|
|
cells in the associated bipartite graph (vertices split into columns and
|
|
words).
|
|
@@ -731,7 +731,7 @@ cdef int refine_by_bip_degree(PartitionS
|
|
return invariant
|
|
|
|
cdef int compare_linear_codes(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree):
|
|
- """
|
|
+ r"""
|
|
Compare gamma_1(S1) and gamma_2(S2).
|
|
|
|
Return return -1 if gamma_1(S1) < gamma_2(S2), 0 if gamma_1(S1) == gamma_2(S2),
|
|
@@ -804,7 +804,7 @@ cdef int compare_linear_codes(int *gamma
|
|
return 0
|
|
|
|
cdef int compare_nonlinear_codes(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree):
|
|
- """
|
|
+ r"""
|
|
Compare gamma_1(S1) and gamma_2(S2).
|
|
|
|
Return return -1 if gamma_1(S1) < gamma_2(S2), 0 if gamma_1(S1) == gamma_2(S2),
|
|
diff -up src/sage/groups/perm_gps/permgroup_element.pyx.orig src/sage/groups/perm_gps/permgroup_element.pyx
|
|
--- src/sage/groups/perm_gps/permgroup_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/groups/perm_gps/permgroup_element.pyx 2020-02-27 11:35:14.696667810 -0700
|
|
@@ -1064,7 +1064,7 @@ cdef class PermutationGroupElement(Multi
|
|
return y
|
|
|
|
cpdef _act_on_(self, x, bint self_on_left):
|
|
- """
|
|
+ r"""
|
|
Return the right action of self on left.
|
|
|
|
For example, if f=left is a polynomial, then this function returns
|
|
@@ -1498,7 +1498,7 @@ cdef class PermutationGroupElement(Multi
|
|
return ~self
|
|
|
|
def sign(self):
|
|
- """
|
|
+ r"""
|
|
Returns the sign of self, which is `(-1)^{s}`, where
|
|
`s` is the number of swaps.
|
|
|
|
@@ -1735,7 +1735,7 @@ cdef class PermutationGroupElement(Multi
|
|
return _Partitions(cycle_type)
|
|
|
|
def has_descent(self, i, side = "right", positive = False):
|
|
- """
|
|
+ r"""
|
|
INPUT:
|
|
|
|
- ``i``: an element of the index set
|
|
diff -up src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx.orig src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx
|
|
--- src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx 2020-02-27 08:47:01.774920139 -0700
|
|
@@ -279,7 +279,7 @@ cdef class SemimonomialTransformation(Mu
|
|
return (self.parent(), (0, self.v, self.perm, self.get_autom()))
|
|
|
|
def get_v(self):
|
|
- """
|
|
+ r"""
|
|
Returns the component corresponding to `{R^{\times}}^n` of ``self``.
|
|
|
|
EXAMPLES::
|
|
@@ -291,7 +291,7 @@ cdef class SemimonomialTransformation(Mu
|
|
return self.v
|
|
|
|
def get_v_inverse(self):
|
|
- """
|
|
+ r"""
|
|
Returns the (elementwise) inverse of the component corresponding to
|
|
`{R^{\times}}^n` of ``self``.
|
|
|
|
@@ -328,7 +328,7 @@ cdef class SemimonomialTransformation(Mu
|
|
return self.alpha
|
|
|
|
def invert_v(self):
|
|
- """
|
|
+ r"""
|
|
Elementwisely invert all entries of ``self`` which
|
|
correspond to the component `{R^{\times}}^n`.
|
|
|
|
diff -up src/sage/libs/eclib/mwrank.pyx.orig src/sage/libs/eclib/mwrank.pyx
|
|
--- src/sage/libs/eclib/mwrank.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/eclib/mwrank.pyx 2020-02-26 13:47:58.684086935 -0700
|
|
@@ -333,7 +333,7 @@ cdef class _Curvedata: # cython class
|
|
return string_sigoff(Curvedata_repr(self.x))[:-1]
|
|
|
|
def silverman_bound(self):
|
|
- """
|
|
+ r"""
|
|
The Silverman height bound for this elliptic curve.
|
|
|
|
OUTPUT:
|
|
@@ -362,7 +362,7 @@ cdef class _Curvedata: # cython class
|
|
return Curvedata_silverman_bound(self.x)
|
|
|
|
def cps_bound(self):
|
|
- """
|
|
+ r"""
|
|
The Cremona-Prickett-Siksek height bound for this elliptic curve.
|
|
|
|
OUTPUT:
|
|
@@ -397,7 +397,7 @@ cdef class _Curvedata: # cython class
|
|
return x
|
|
|
|
def height_constant(self):
|
|
- """
|
|
+ r"""
|
|
A height bound for this elliptic curve.
|
|
|
|
OUTPUT:
|
|
@@ -512,7 +512,7 @@ cdef class _mw:
|
|
cdef int verb
|
|
|
|
def __init__(self, _Curvedata curve, verb=False, pp=1, maxr=999):
|
|
- """
|
|
+ r"""
|
|
Constructor for mw class.
|
|
|
|
INPUT:
|
|
@@ -904,7 +904,7 @@ cdef class _mw:
|
|
return ok, index, unsat
|
|
|
|
def search(self, h_lim, int moduli_option=0, int verb=0):
|
|
- """
|
|
+ r"""
|
|
Search for points in the mw group.
|
|
|
|
INPUT:
|
|
@@ -1261,7 +1261,7 @@ cdef class _two_descent:
|
|
sig_off()
|
|
|
|
def getbasis(self):
|
|
- """
|
|
+ r"""
|
|
Returns the basis of points found by doing a 2-descent.
|
|
|
|
If the success and certain flags are 1, this will be a
|
|
diff -up src/sage/libs/eclib/newforms.pyx.orig src/sage/libs/eclib/newforms.pyx
|
|
--- src/sage/libs/eclib/newforms.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/eclib/newforms.pyx 2020-02-27 11:17:03.555393145 -0700
|
|
@@ -22,7 +22,7 @@ from sage.modular.all import Cusp
|
|
|
|
|
|
cdef class ECModularSymbol:
|
|
- """
|
|
+ r"""
|
|
Modular symbol associated with an elliptic curve, using John Cremona's newforms class.
|
|
|
|
EXAMPLES::
|
|
diff -up src/sage/libs/fes.pyx.orig src/sage/libs/fes.pyx
|
|
--- src/sage/libs/fes.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/fes.pyx 2020-02-27 15:31:37.911298615 -0700
|
|
@@ -288,7 +288,7 @@ def find_coordinate_change(As, max_tries
|
|
|
|
|
|
def prepare_polynomials(f):
|
|
- """
|
|
+ r"""
|
|
Finds a linear combination of the equations that is faster to solve by FES
|
|
|
|
INPUT:
|
|
diff -up src/sage/libs/linkages/padics/API.pxi.orig src/sage/libs/linkages/padics/API.pxi
|
|
--- src/sage/libs/linkages/padics/API.pxi.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/linkages/padics/API.pxi 2020-02-27 15:42:51.990640350 -0700
|
|
@@ -469,7 +469,7 @@ cdef inline long chash(celement a, long
|
|
|
|
# the expansion_mode enum is defined in padic_template_element_header.pxi
|
|
cdef inline cexpansion_next(celement value, expansion_mode mode, long curpower, PowComputer_ prime_pow):
|
|
- """
|
|
+ r"""
|
|
Return the next digit in a `\pi`-adic expansion of ``value``.
|
|
|
|
INPUT:
|
|
@@ -483,7 +483,7 @@ cdef inline cexpansion_next(celement val
|
|
pass
|
|
|
|
cdef inline cexpansion_getitem(celement value, long m, PowComputer_ prime_pow):
|
|
- """
|
|
+ r"""
|
|
Return the `m`th `\pi`-adic digit in the ``simple_mode`` expansion.
|
|
|
|
INPUT:
|
|
@@ -512,7 +512,7 @@ cdef list ccoefficients(celement x, long
|
|
pass
|
|
|
|
cdef int cteichmuller(celement out, celement value, long prec, PowComputer_class prime_pow) except -1:
|
|
- """
|
|
+ r"""
|
|
Teichmuller lifting.
|
|
|
|
INPUT:
|
|
diff -up src/sage/libs/linkages/padics/fmpz_poly_unram.pxi.orig src/sage/libs/linkages/padics/fmpz_poly_unram.pxi
|
|
--- src/sage/libs/linkages/padics/fmpz_poly_unram.pxi.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/linkages/padics/fmpz_poly_unram.pxi 2020-02-27 15:42:11.511401421 -0700
|
|
@@ -659,7 +659,7 @@ cdef list ccoefficients(celement x, long
|
|
return ans
|
|
|
|
cdef int cteichmuller(celement out, celement value, long prec, PowComputer_ prime_pow) except -1:
|
|
- """
|
|
+ r"""
|
|
Teichmuller lifting.
|
|
|
|
INPUT:
|
|
@@ -838,7 +838,7 @@ cdef inline int cconv_mpz_t_out(mpz_t ou
|
|
## Extra functions ##
|
|
|
|
cdef cmatrix_mod_pn(celement a, long aprec, long valshift, PowComputer_ prime_pow):
|
|
- """
|
|
+ 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/libs/linkages/padics/mpz.pxi.orig src/sage/libs/linkages/padics/mpz.pxi
|
|
--- src/sage/libs/linkages/padics/mpz.pxi.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/linkages/padics/mpz.pxi 2020-02-27 15:43:41.974700571 -0700
|
|
@@ -567,7 +567,7 @@ cdef list ccoefficients(mpz_t x, long va
|
|
return [ansq]
|
|
|
|
cdef int cteichmuller(mpz_t out, mpz_t value, long prec, PowComputer_ prime_pow) except -1:
|
|
- """
|
|
+ r"""
|
|
Teichmuller lifting.
|
|
|
|
INPUT:
|
|
diff -up src/sage/libs/linkages/padics/unram_shared.pxi.orig src/sage/libs/linkages/padics/unram_shared.pxi
|
|
--- src/sage/libs/linkages/padics/unram_shared.pxi.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/linkages/padics/unram_shared.pxi 2020-02-26 13:52:20.857135309 -0700
|
|
@@ -70,7 +70,7 @@ def frobenius_unram(self, arithmetic=Tru
|
|
|
|
@cython.binding(True)
|
|
def norm_unram(self, base = None):
|
|
- """
|
|
+ r"""
|
|
Return the absolute or relative norm of this element.
|
|
|
|
.. WARNING::
|
|
@@ -151,7 +151,7 @@ def norm_unram(self, base = None):
|
|
|
|
@cython.binding(True)
|
|
def trace_unram(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/libs/ntl/ntl_GF2E.pyx.orig src/sage/libs/ntl/ntl_GF2E.pyx
|
|
--- src/sage/libs/ntl/ntl_GF2E.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/ntl/ntl_GF2E.pyx 2020-02-27 15:36:28.211821169 -0700
|
|
@@ -66,7 +66,7 @@ def ntl_GF2E_random(ntl_GF2EContext_clas
|
|
|
|
cdef class ntl_GF2E(object):
|
|
r"""
|
|
- The \\class{GF2E} represents a finite extension field over GF(2)
|
|
+ The \class{GF2E} represents a finite extension field over GF(2)
|
|
using NTL. Elements are represented as polynomials over GF(2)
|
|
modulo a modulus.
|
|
|
|
@@ -435,7 +435,7 @@ cdef class ntl_GF2E(object):
|
|
return l
|
|
|
|
def _sage_(ntl_GF2E self, k=None):
|
|
- """
|
|
+ r"""
|
|
Returns a \class{FiniteFieldElement} representation
|
|
of this element. If a \class{FiniteField} k is provided
|
|
it is constructed in this field if possible. A \class{FiniteField}
|
|
diff -up src/sage/libs/ntl/ntl_GF2X.pyx.orig src/sage/libs/ntl/ntl_GF2X.pyx
|
|
--- src/sage/libs/ntl/ntl_GF2X.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/ntl/ntl_GF2X.pyx 2020-02-27 15:34:59.579465248 -0700
|
|
@@ -480,7 +480,7 @@ cdef class ntl_GF2X(object):
|
|
return [self[i] for i in range(GF2X_deg(self.x)+1)]
|
|
|
|
def bin(ntl_GF2X self):
|
|
- """
|
|
+ r"""
|
|
Returns binary representation of this element. It is
|
|
the same as setting \code{ntl.GF2XHexOutput(False)} and
|
|
representing this element afterwards. However it should be
|
|
@@ -503,7 +503,7 @@ cdef class ntl_GF2X(object):
|
|
return s
|
|
|
|
def hex(ntl_GF2X self):
|
|
- """
|
|
+ r"""
|
|
Return an hexadecimal representation of this element.
|
|
|
|
It is the same as setting \code{ntl.GF2XHexOutput(True)} and
|
|
diff -up src/sage/libs/ntl/ntl_mat_GF2E.pyx.orig src/sage/libs/ntl/ntl_mat_GF2E.pyx
|
|
--- src/sage/libs/ntl/ntl_mat_GF2E.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/ntl/ntl_mat_GF2E.pyx 2020-02-27 15:33:55.565652664 -0700
|
|
@@ -174,7 +174,7 @@ cdef class ntl_mat_GF2E(object):
|
|
return unpickle_class_args, (ntl_mat_GF2E, (self.modulus_context(), self.x.NumRows(), self.x.NumCols(), self.list()))
|
|
|
|
def __repr__(self):
|
|
- """
|
|
+ r"""
|
|
Return the string representation of self.
|
|
|
|
EXAMPLES::
|
|
@@ -439,7 +439,7 @@ cdef class ntl_mat_GF2E(object):
|
|
return r
|
|
|
|
def gauss(self,ncols=-1):
|
|
- """
|
|
+ r"""
|
|
Performs unitary row operations so as to bring this matrix
|
|
into row echelon form. If the optional argument \code{ncols}
|
|
is supplied, stops when first ncols columns are in echelon
|
|
diff -up src/sage/libs/ntl/ntl_mat_GF2.pyx.orig src/sage/libs/ntl/ntl_mat_GF2.pyx
|
|
--- src/sage/libs/ntl/ntl_mat_GF2.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/ntl/ntl_mat_GF2.pyx 2020-02-27 15:38:58.065038500 -0700
|
|
@@ -1,4 +1,4 @@
|
|
-"""
|
|
+r"""
|
|
Matrices over the $\GF{2}$ via NTL
|
|
|
|
This class is only provided to have a complete NTL interface and for
|
|
@@ -427,7 +427,7 @@ cdef class ntl_mat_GF2(object):
|
|
return r
|
|
|
|
def gauss(self,ncols=-1):
|
|
- """
|
|
+ r"""
|
|
Performs unitary row operations so as to bring this matrix
|
|
into row echelon form (not reduced!). If the optional
|
|
argument \code{ncols} is supplied, stops when first ncols
|
|
@@ -591,7 +591,7 @@ cdef class ntl_mat_GF2(object):
|
|
return r
|
|
|
|
def __invert__(self):
|
|
- """
|
|
+ r"""
|
|
Return $X = A^{-1}$; an error is raised if A is singular.
|
|
|
|
EXAMPLES::
|
|
diff -up src/sage/libs/ntl/ntl_mat_ZZ.pyx.orig src/sage/libs/ntl/ntl_mat_ZZ.pyx
|
|
--- src/sage/libs/ntl/ntl_mat_ZZ.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/ntl/ntl_mat_ZZ.pyx 2020-02-27 15:32:42.159053522 -0700
|
|
@@ -66,7 +66,7 @@ cdef class ntl_mat_ZZ(object):
|
|
The \class{mat_ZZ} class implements arithmetic with matrices over $\Z$.
|
|
"""
|
|
def __init__(self, nrows=0, ncols=0, v=None):
|
|
- """
|
|
+ r"""
|
|
The \class{mat_ZZ} class implements arithmetic with matrices over $\Z$.
|
|
|
|
EXAMPLES::
|
|
@@ -122,7 +122,7 @@ cdef class ntl_mat_ZZ(object):
|
|
return unpickle_class_args, (ntl_mat_ZZ, (self.__nrows, self.__ncols, self.list()))
|
|
|
|
def __repr__(self):
|
|
- """
|
|
+ r"""
|
|
Return the string representation of self.
|
|
|
|
EXAMPLES::
|
|
diff -up src/sage/libs/ntl/ntl_ZZ_pEX.pyx.orig src/sage/libs/ntl/ntl_ZZ_pEX.pyx
|
|
--- src/sage/libs/ntl/ntl_ZZ_pEX.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/ntl/ntl_ZZ_pEX.pyx 2020-02-27 15:40:20.817482630 -0700
|
|
@@ -1,4 +1,4 @@
|
|
-"""
|
|
+r"""
|
|
Wrapper for NTL's polynomials over finite ring extensions of $\Z / p\Z.$
|
|
|
|
AUTHORS:
|
|
diff -up src/sage/libs/ntl/ntl_ZZX.pyx.orig src/sage/libs/ntl/ntl_ZZX.pyx
|
|
--- src/sage/libs/ntl/ntl_ZZX.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/ntl/ntl_ZZX.pyx 2020-02-27 11:19:30.586809381 -0700
|
|
@@ -688,7 +688,7 @@ cdef class ntl_ZZX(object):
|
|
return (self*other).quo_rem(g)[0]
|
|
|
|
def xgcd(self, ntl_ZZX other, proof=None):
|
|
- """
|
|
+ r"""
|
|
If self and other are coprime over the rationals, return r, s,
|
|
t such that r = s*self + t*other. Otherwise return 0. This
|
|
is \emph{not} the same as the \sage function on polynomials
|
|
diff -up src/sage/libs/ppl.pyx.orig src/sage/libs/ppl.pyx
|
|
--- src/sage/libs/ppl.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/ppl.pyx 2020-02-27 11:18:35.716773608 -0700
|
|
@@ -5756,7 +5756,7 @@ cdef _make_Constraint_from_richcmp(lhs_,
|
|
|
|
####################################################
|
|
cdef class Constraint(object):
|
|
- """
|
|
+ r"""
|
|
Wrapper for PPL's ``Constraint`` class.
|
|
|
|
An object of the class ``Constraint`` is either:
|
|
diff -up src/sage/libs/pynac/pynac.pyx.orig src/sage/libs/pynac/pynac.pyx
|
|
--- src/sage/libs/pynac/pynac.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/pynac/pynac.pyx 2020-02-26 13:51:20.673271444 -0700
|
|
@@ -385,7 +385,7 @@ cdef stdstring* string_from_pystr(py_str
|
|
return new stdstring(s)
|
|
|
|
cdef stdstring* py_latex_variable(var_name):
|
|
- """
|
|
+ r"""
|
|
Returns a c++ string containing the latex representation of the given
|
|
variable name.
|
|
|
|
@@ -414,7 +414,7 @@ cdef stdstring* py_latex_variable(var_na
|
|
return string_from_pystr(py_vlatex)
|
|
|
|
def py_latex_variable_for_doctests(x):
|
|
- """
|
|
+ r"""
|
|
Internal function used so we can doctest a certain cdef'd method.
|
|
|
|
EXAMPLES::
|
|
@@ -703,7 +703,7 @@ cdef stdstring* py_latex_fderivative(uns
|
|
operator_string=r"\frac{\partial^{%s}}{%s}"%(len(params),''.join(diff_args))
|
|
py_res = operator_string+py_latex_function_pystring(id,args,False)
|
|
else:
|
|
- ostr = ''.join(['\mathrm{D}_{',', '.join([repr(int(x)) for x in params]), '}'])
|
|
+ ostr = ''.join([r'\mathrm{D}_{',', '.join([repr(int(x)) for x in params]), '}'])
|
|
fstr = py_latex_function_pystring(id, args, True)
|
|
py_res = ostr + fstr
|
|
return string_from_pystr(py_res)
|
|
@@ -1164,7 +1164,7 @@ cdef bint py_is_crational(x):
|
|
return False
|
|
|
|
def py_is_crational_for_doctest(x):
|
|
- """
|
|
+ r"""
|
|
Returns True if pynac should treat this object as an element of `\QQ(i)`.
|
|
|
|
TESTS::
|
|
@@ -1304,7 +1304,7 @@ cdef bint py_is_cinteger(x):
|
|
return py_is_integer(x) or (py_is_crational(x) and py_denom(x) == 1)
|
|
|
|
def py_is_cinteger_for_doctest(x):
|
|
- """
|
|
+ r"""
|
|
Returns True if pynac should treat this object as an element of `\ZZ(i)`.
|
|
|
|
TESTS::
|
|
diff -up src/sage/libs/ratpoints.pyx.orig src/sage/libs/ratpoints.pyx
|
|
--- src/sage/libs/ratpoints.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/ratpoints.pyx 2020-02-27 15:25:26.499254622 -0700
|
|
@@ -42,7 +42,7 @@ cdef int process(long x, long z, mpz_t y
|
|
|
|
def ratpoints(list coeffs, long H, verbose=False, long max=0,
|
|
min_x_denom=None, max_x_denom=None, intervals=[]):
|
|
- """
|
|
+ r"""
|
|
Access the ratpoints library to find points on the hyperelliptic curve:
|
|
|
|
`y^2 = a_n x^n + \cdots + a_1 x + a_0.`
|
|
diff -up src/sage/libs/singular/polynomial.pyx.orig src/sage/libs/singular/polynomial.pyx
|
|
--- src/sage/libs/singular/polynomial.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/singular/polynomial.pyx 2020-02-27 15:18:01.665479916 -0700
|
|
@@ -22,7 +22,7 @@ cdef extern from *: # hack to get at cyt
|
|
int unlikely(int)
|
|
|
|
import re
|
|
-plusminus_pattern = re.compile("([^\(^])([\+\-])")
|
|
+plusminus_pattern = re.compile(r"([^\(^])([\+\-])")
|
|
|
|
from sage.cpython.string cimport bytes_to_str, str_to_bytes
|
|
|
|
diff -up src/sage/libs/symmetrica/sc.pxi.orig src/sage/libs/symmetrica/sc.pxi
|
|
--- src/sage/libs/symmetrica/sc.pxi.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/libs/symmetrica/sc.pxi 2020-02-26 10:48:22.217706792 -0700
|
|
@@ -103,7 +103,7 @@ def charvalue_symmetrica(irred, cls, tab
|
|
|
|
|
|
def kranztafel_symmetrica(a, b):
|
|
- """
|
|
+ r"""
|
|
you enter the INTEGER objects, say a and b, and res becomes a
|
|
MATRIX object, the charactertable of S_b \wr S_a, co becomes a
|
|
VECTOR object of classorders and cl becomes a VECTOR object of
|
|
diff -up src/sage/matrix/matrix0.pyx.orig src/sage/matrix/matrix0.pyx
|
|
--- src/sage/matrix/matrix0.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix0.pyx 2020-02-27 12:13:14.304142090 -0700
|
|
@@ -2175,7 +2175,7 @@ cdef class Matrix(sage.structure.element
|
|
# Functions
|
|
###################################################
|
|
def act_on_polynomial(self, f):
|
|
- """
|
|
+ r"""
|
|
Returns the polynomial f(self\*x).
|
|
|
|
INPUT:
|
|
@@ -2241,7 +2241,7 @@ cdef class Matrix(sage.structure.element
|
|
# Arithmetic
|
|
###################################################
|
|
def commutator(self, other):
|
|
- """
|
|
+ r"""
|
|
Return the commutator self\*other - other\*self.
|
|
|
|
EXAMPLES::
|
|
@@ -4713,7 +4713,7 @@ cdef class Matrix(sage.structure.element
|
|
# Arithmetic
|
|
###################################################
|
|
cdef _vector_times_matrix_(self, Vector v):
|
|
- """
|
|
+ r"""
|
|
Returns the vector times matrix product.
|
|
|
|
INPUT:
|
|
diff -up src/sage/matrix/matrix2.pyx.orig src/sage/matrix/matrix2.pyx
|
|
--- src/sage/matrix/matrix2.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix2.pyx 2020-02-27 09:38:09.247266810 -0700
|
|
@@ -6754,7 +6754,7 @@ cdef class Matrix(Matrix1):
|
|
raise NotImplementedError("%s\nEchelon form not implemented over '%s'."%(msg,self.base_ring()))
|
|
|
|
def echelon_form(self, algorithm="default", cutoff=0, **kwds):
|
|
- """
|
|
+ r"""
|
|
Return the echelon form of self.
|
|
|
|
.. NOTE::
|
|
@@ -8810,7 +8810,7 @@ cdef class Matrix(Matrix1):
|
|
return img
|
|
|
|
def density(self):
|
|
- """
|
|
+ r"""
|
|
Return the density of the matrix.
|
|
|
|
By density we understand the ratio of the number of nonzero
|
|
diff -up src/sage/matrix/matrix_gf2e_dense.pyx.orig src/sage/matrix/matrix_gf2e_dense.pyx
|
|
--- src/sage/matrix/matrix_gf2e_dense.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix_gf2e_dense.pyx 2020-02-27 12:14:38.189668697 -0700
|
|
@@ -1,4 +1,4 @@
|
|
-"""
|
|
+r"""
|
|
Dense matrices over `\GF{2^e}` for `2 <= e <= 10` using the M4RIE library.
|
|
|
|
The M4RIE library offers two matrix representations:
|
|
@@ -502,7 +502,7 @@ cdef class Matrix_gf2e_dense(matrix_dens
|
|
return ans
|
|
|
|
cpdef Matrix_gf2e_dense _multiply_karatsuba(Matrix_gf2e_dense self, Matrix_gf2e_dense right):
|
|
- """
|
|
+ r"""
|
|
Matrix multiplication using Karatsuba over polynomials with
|
|
matrix coefficients over GF(2).
|
|
|
|
diff -up src/sage/matrix/matrix_integer_dense.pyx.orig src/sage/matrix/matrix_integer_dense.pyx
|
|
--- src/sage/matrix/matrix_integer_dense.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix_integer_dense.pyx 2020-02-27 09:28:59.795169737 -0700
|
|
@@ -1011,7 +1011,7 @@ cdef class Matrix_integer_dense(Matrix_d
|
|
|
|
# TODO: Implement better
|
|
cdef _vector_times_matrix_(self, Vector v):
|
|
- """
|
|
+ r"""
|
|
Returns the vector times matrix product.
|
|
|
|
INPUT:
|
|
@@ -3948,7 +3948,7 @@ cdef class Matrix_integer_dense(Matrix_d
|
|
return M
|
|
|
|
def _invert_iml(self, use_nullspace=False, check_invertible=True):
|
|
- """
|
|
+ r"""
|
|
Invert this matrix using IML. The output matrix is an integer
|
|
matrix and a denominator.
|
|
|
|
@@ -4013,7 +4013,7 @@ cdef class Matrix_integer_dense(Matrix_d
|
|
return self._solve_iml(P.identity_matrix(), right=True)
|
|
|
|
def _invert_flint(self):
|
|
- """
|
|
+ r"""
|
|
Invert this matrix using FLINT. The output matrix is an integer
|
|
matrix and a denominator.
|
|
|
|
@@ -4299,7 +4299,7 @@ cdef class Matrix_integer_dense(Matrix_d
|
|
return X
|
|
|
|
def _solve_iml(self, Matrix_integer_dense B, right=True):
|
|
- """
|
|
+ r"""
|
|
Let A equal self be a square matrix. Given B return an integer
|
|
matrix C and an integer d such that self C\*A == d\*B if right is
|
|
False or A\*C == d\*B if right is True.
|
|
@@ -4465,7 +4465,7 @@ cdef class Matrix_integer_dense(Matrix_d
|
|
mpz_array_clear(mp_N, n*m)
|
|
|
|
def _solve_flint(self, Matrix_integer_dense B, right=True):
|
|
- """
|
|
+ r"""
|
|
Let A equal self be a square matrix. Given B return an integer
|
|
matrix C and an integer d such that self C\*A == d\*B if right is
|
|
False or A\*C == d\*B if right is True.
|
|
@@ -5008,7 +5008,7 @@ cdef class Matrix_integer_dense(Matrix_d
|
|
# This code below is by E. Burcin. Thanks!
|
|
#####################################################################################
|
|
def _hnf_mod(self, D):
|
|
- """
|
|
+ r"""
|
|
INPUT:
|
|
|
|
- ``D`` -- a small integer that is assumed to be a
|
|
diff -up src/sage/matrix/matrix_integer_sparse.pyx.orig src/sage/matrix/matrix_integer_sparse.pyx
|
|
--- src/sage/matrix/matrix_integer_sparse.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix_integer_sparse.pyx 2020-02-27 12:09:43.961809493 -0700
|
|
@@ -909,7 +909,7 @@ cdef class Matrix_integer_sparse(Matrix_
|
|
return g
|
|
|
|
def _solve_right_nonsingular_square(self, B, algorithm=None, check_rank=False):
|
|
- """
|
|
+ r"""
|
|
If self is a matrix `A`, then this function returns a
|
|
vector or matrix `X` such that `A X = B`. If
|
|
`B` is a vector then `X` is a vector and if
|
|
diff -up src/sage/matrix/matrix_modn_dense_double.pyx.orig src/sage/matrix/matrix_modn_dense_double.pyx
|
|
--- src/sage/matrix/matrix_modn_dense_double.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix_modn_dense_double.pyx 2020-02-27 12:21:56.689974086 -0700
|
|
@@ -1,4 +1,4 @@
|
|
-"""
|
|
+r"""
|
|
Dense matrices over `\ZZ/n\ZZ` for `n < 2^{23}` using LinBox's ``Modular<double>``
|
|
|
|
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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix_modn_dense_float.pyx 2020-02-27 12:16:51.940319470 -0700
|
|
@@ -1,4 +1,4 @@
|
|
-"""
|
|
+r"""
|
|
Dense matrices over `\ZZ/n\ZZ` for `n < 2^{11}` using LinBox's ``Modular<float>``
|
|
|
|
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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix_modn_dense_template.pxi 2020-02-27 12:30:47.428707123 -0700
|
|
@@ -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_modn_sparse.pyx.orig src/sage/matrix/matrix_modn_sparse.pyx
|
|
--- src/sage/matrix/matrix_modn_sparse.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix_modn_sparse.pyx 2020-02-27 12:31:50.826605802 -0700
|
|
@@ -854,7 +854,7 @@ cdef class Matrix_modn_sparse(matrix_spa
|
|
raise ValueError("no algorithm '%s'"%algorithm)
|
|
|
|
def _solve_right_nonsingular_square(self, B, algorithm=None, check_rank=False):
|
|
- """
|
|
+ r"""
|
|
If self is a matrix `A`, then this function returns a
|
|
vector or matrix `X` such that `A X = B`. If
|
|
`B` is a vector then `X` is a vector and if
|
|
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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix_polynomial_dense.pyx 2020-02-27 09:22:35.512126137 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matrix/matrix_rational_dense.pyx 2020-02-27 12:27:53.166741857 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matroids/basis_exchange_matroid.pyx 2020-02-27 14:52:21.996354648 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matroids/basis_matroid.pyx 2020-02-27 11:05:01.945973893 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matroids/extension.pyx 2020-02-27 11:09:44.223086757 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matroids/lean_matrix.pyx 2020-02-27 14:51:31.676283450 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matroids/linear_matroid.pyx 2020-02-27 11:08:49.724030318 -0700
|
|
@@ -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:`<LinearMatroid.is_field_isomorphism>` 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 = (<QuaternaryMatrix>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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matroids/matroid.pyx 2020-02-27 11:14:07.206492095 -0700
|
|
@@ -3080,7 +3080,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
|
|
@@ -3360,7 +3360,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
|
|
@@ -3483,7 +3483,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:
|
|
@@ -3887,7 +3887,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
|
|
@@ -3999,7 +3999,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
|
|
@@ -4071,7 +4071,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.
|
|
@@ -4259,7 +4259,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
|
|
@@ -4349,7 +4349,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
|
|
@@ -4660,7 +4660,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.
|
|
@@ -4737,7 +4737,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
|
|
@@ -7432,7 +7432,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/matroids/set_system.pyx 2020-02-27 14:50:11.189769061 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/misc/cachefunc.pyx 2020-02-27 11:38:25.902302125 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/modular/arithgroup/arithgroup_element.pyx 2020-02-27 11:52:51.677078266 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/modular/arithgroup/congroup.pyx 2020-02-27 09:02:34.164911827 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/modular/arithgroup/farey_symbol.pyx 2020-02-27 09:01:09.509443852 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/modular/modsym/heilbronn.pyx 2020-02-27 11:56:13.562672136 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/modular/modsym/manin_symbol.pyx 2020-02-27 09:03:56.595444297 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/modular/modsym/p1list.pyx 2020-02-27 11:55:42.521181786 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/modules/free_module_element.pyx 2020-02-27 15:01:58.389454347 -0700
|
|
@@ -1966,7 +1966,7 @@ cdef class FreeModuleElement(Vector):
|
|
return copy(self)
|
|
|
|
def lift_centered(self):
|
|
- """
|
|
+ r"""
|
|
Lift to a congruent, centered vector.
|
|
|
|
INPUT:
|
|
@@ -2338,7 +2338,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
|
|
@@ -3609,7 +3609,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/numerical/backends/generic_backend.pyx 2020-02-27 15:12:48.869255994 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/numerical/backends/glpk_backend.pyx 2020-02-27 15:11:17.902928905 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/numerical/backends/interactivelp_backend.pyx 2020-02-27 15:09:45.383668708 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/quadratic_forms/count_local_2.pyx 2020-02-27 14:47:35.887635615 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/quivers/algebra_elements.pyx 2020-02-27 11:46:21.879821027 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/bernoulli_mod_p.pyx 2020-02-27 14:12:09.407391213 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/complex_arb.pyx 2020-02-27 10:34:45.320041770 -0700
|
|
@@ -2922,7 +2922,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)`.
|
|
@@ -3640,7 +3640,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/complex_double.pyx 2020-02-27 10:32:06.489839183 -0700
|
|
@@ -1578,7 +1578,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/complex_interval.pyx 2020-02-27 10:20:29.626115066 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/complex_mpc.pyx 2020-02-26 11:15:34.722679686 -0700
|
|
@@ -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<im_first>(?P<im_first_im_sign>' + sign + ')?\s*(?P<im_first_im_abs>' + imaginary_ten + ')' \
|
|
- '(\s*(?P<im_first_re_sign>' + sign + ')\s*(?P<im_first_re_abs>' + 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<im_first>(?P<im_first_im_sign>' + sign + r')?\s*(?P<im_first_im_abs>' + imaginary_ten + ')' \
|
|
+ r'(\s*(?P<im_first_re_sign>' + sign + r')\s*(?P<im_first_re_abs>' + number_ten + '))?)' \
|
|
'|' \
|
|
- '(?P<re_first>(?P<re_first_re_sign>' + sign + ')?\s*(?P<re_first_re_abs>' + number_ten + ')' \
|
|
- '(\s*(?P<re_first_im_sign>' + sign + ')\s*(?P<re_first_im_abs>' + imaginary_ten + '))?)'
|
|
-re_complex_ten = re.compile('^\s*(?:' + complex_ten + ')\s*$', re.I)
|
|
+ '(?P<re_first>(?P<re_first_re_sign>' + sign + r')?\s*(?P<re_first_re_abs>' + number_ten + ')' \
|
|
+ r'(\s*(?P<re_first_im_sign>' + sign + r')\s*(?P<re_first_im_abs>' + 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<im_first>(?P<im_first_im_sign>' + sign + ')?\s*(?P<im_first_im_abs>' + imaginary + ')' \
|
|
- '(\s*(?P<im_first_re_sign>' + sign + ')\s*(?P<im_first_re_abs>' + number + '))?)' \
|
|
+ number = r'nan(?:\([0-9A-Z_]*\))?|inf(?:inity)?|' + number
|
|
+ imaginary = r'i(?:\s*\*\s*(?:' + number + '))?|(?:' + number + r')\s*\*\s*i'
|
|
+ complex = '(?P<im_first>(?P<im_first_im_sign>' + sign + r')?\s*(?P<im_first_im_abs>' + imaginary + ')' \
|
|
+ r'(\s*(?P<im_first_re_sign>' + sign + r')\s*(?P<im_first_re_abs>' + number + '))?)' \
|
|
'|' \
|
|
- '(?P<re_first>(?P<re_first_re_sign>' + sign + ')?\s*(?P<re_first_re_abs>' + number + ')' \
|
|
- '(\s*(?P<re_first_im_sign>' + sign + ')\s*(?P<re_first_im_abs>' + imaginary + '))?)'
|
|
+ '(?P<re_first>(?P<re_first_re_sign>' + sign + r')?\s*(?P<re_first_re_abs>' + number + ')' \
|
|
+ r'(\s*(?P<re_first_im_sign>' + sign + r')\s*(?P<re_first_im_abs>' + 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<im_part>' + number + ')', z.expand('\g<' + prefix + '_im_abs>'), re.I)
|
|
+ y = re.search('(?P<im_part>' + number + ')', z.expand(r'\g<' + prefix + '_im_abs>'), re.I)
|
|
if y is None:
|
|
y = '1'
|
|
else:
|
|
- y = y.expand('\g<im_part>')
|
|
+ y = y.expand(r'\g<im_part>')
|
|
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::
|
|
@@ -2085,7 +2085,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/complex_number.pyx 2020-02-27 14:09:39.595076646 -0700
|
|
@@ -1714,7 +1714,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/finite_rings/element_givaro.pyx 2020-02-27 10:22:04.184449193 -0700
|
|
@@ -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.<a> = 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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/finite_rings/element_ntl_gf2e.pyx 2020-02-27 10:22:49.535650221 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/finite_rings/finite_field_base.pyx 2020-02-27 10:24:14.382155455 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/finite_rings/hom_finite_field.pyx 2020-02-27 14:05:34.420471507 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/finite_rings/integer_mod.pyx 2020-02-27 10:27:31.196688078 -0700
|
|
@@ -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.
|
|
|
|
@@ -2185,7 +2185,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)
|
|
@@ -2294,7 +2294,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
|
|
@@ -2327,7 +2327,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
|
|
|
|
@@ -2948,7 +2948,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`.
|
|
"""
|
|
@@ -2959,7 +2959,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
|
|
@@ -3137,7 +3137,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
|
|
|
|
@@ -3448,7 +3448,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)
|
|
@@ -3596,7 +3596,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`.
|
|
"""
|
|
@@ -3607,7 +3607,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/finite_rings/residue_field.pyx 2020-02-26 12:24:03.640048006 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/function_field/element.pyx 2020-02-26 14:11:12.803894369 -0700
|
|
@@ -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.<t> = FunctionField(QQ)
|
|
diff -up src/sage/rings/function_field/ideal.py.orig src/sage/rings/function_field/ideal.py
|
|
--- src/sage/rings/function_field/ideal.py.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/function_field/ideal.py 2020-02-26 14:10:24.140803564 -0700
|
|
@@ -2166,7 +2166,7 @@ class FunctionFieldIdeal_global(Function
|
|
return self.gens_over_base()
|
|
|
|
def gens_two(self):
|
|
- """
|
|
+ r"""
|
|
Return two generators of this fractional ideal.
|
|
|
|
If the ideal is principal, one generator *may* be returned.
|
|
diff -up src/sage/rings/integer_ring.pyx.orig src/sage/rings/integer_ring.pyx
|
|
--- src/sage/rings/integer_ring.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/integer_ring.pyx 2020-02-27 14:00:39.430781027 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/laurent_series_ring_element.pyx 2020-02-27 10:37:46.261850642 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/number_field/number_field_element.pyx 2020-02-27 14:17:24.733733303 -0700
|
|
@@ -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::
|
|
@@ -3877,7 +3877,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/number_field/number_field_element_quadratic.pyx 2020-02-26 12:30:16.381058496 -0700
|
|
@@ -1,4 +1,4 @@
|
|
-"""
|
|
+r"""
|
|
Optimized Quadratic Number Field Elements
|
|
|
|
This file defines a Cython class ``NumberFieldElement_quadratic`` to speed up
|
|
@@ -840,7 +840,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}`.
|
|
|
|
@@ -1581,7 +1581,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
|
|
@@ -2015,7 +2015,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/number_field/number_field_morphisms.pyx 2020-02-27 14:15:30.637780730 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/number_field/totallyreal.pyx 2020-02-26 12:31:22.883761593 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/CA_template.pxi 2020-02-27 14:21:45.536053250 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/CR_template.pxi 2020-02-27 14:20:48.003085660 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/FM_template.pxi 2020-02-27 14:30:07.794033635 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/FP_template.pxi 2020-02-27 14:27:17.166102208 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/local_generic_element.pyx 2020-02-27 10:40:29.052964694 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/morphism.pyx 2020-02-27 14:31:55.331074487 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_capped_absolute_element.pyx 2020-02-27 10:48:47.499131689 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_capped_relative_element.pyx 2020-02-27 10:45:06.545045373 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_ext_element.pyx 2020-02-26 12:37:01.119373785 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_fixed_mod_element.pyx 2020-02-27 10:47:41.918293107 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_floating_point_element.pyx 2020-02-27 10:46:09.415931306 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_generic_element.pyx 2020-02-27 10:43:44.418501293 -0700
|
|
@@ -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:
|
|
@@ -3039,7 +3039,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`.
|
|
@@ -3085,7 +3085,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`.
|
|
@@ -3763,7 +3763,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.
|
|
|
|
@@ -4106,7 +4106,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:
|
|
@@ -4359,7 +4359,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`.
|
|
|
|
@@ -4389,7 +4389,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_template_element.pxi 2020-02-27 10:49:59.029864892 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx 2020-02-26 12:41:30.300414798 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx 2020-02-26 12:40:01.838037825 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_ZZ_pX_element.pyx 2020-02-26 12:38:14.111019390 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx 2020-02-26 12:43:41.091000479 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/pow_computer_ext.pyx 2020-02-27 14:23:35.369082319 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/qadic_flint_CA.pyx 2020-02-27 14:24:22.319239812 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/qadic_flint_CR.pyx 2020-02-27 14:28:41.772583958 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/qadic_flint_FM.pyx 2020-02-27 14:29:11.364052944 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/padics/qadic_flint_FP.pyx 2020-02-27 14:25:28.424053567 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/cyclotomic.pyx 2020-02-27 14:43:20.186376927 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/laurent_polynomial.pyx 2020-02-27 14:42:24.611430268 -0700
|
|
@@ -237,7 +237,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/multi_polynomial_libsingular.pyx 2020-02-26 12:49:19.224880230 -0700
|
|
@@ -2075,7 +2075,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
|
|
@@ -2344,7 +2344,7 @@ cdef class MPolynomial_libsingular(MPoly
|
|
return new_MP((<MPolynomial_libsingular>left)._parent,_p)
|
|
|
|
cpdef _div_(left, right_ringelement):
|
|
- """
|
|
+ r"""
|
|
Divide left by right
|
|
|
|
EXAMPLES::
|
|
@@ -2559,7 +2559,7 @@ cdef class MPolynomial_libsingular(MPoly
|
|
return char_to_str(s)
|
|
|
|
def _latex_(self):
|
|
- """
|
|
+ r"""
|
|
Return a polynomial LaTeX representation of this polynomial.
|
|
|
|
EXAMPLES::
|
|
@@ -4500,7 +4500,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``.
|
|
|
|
@@ -5219,7 +5219,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/multi_polynomial.pyx 2020-02-27 11:00:30.479716969 -0700
|
|
@@ -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
|
|
@@ -1224,7 +1224,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/pbori.pyx 2020-02-27 10:58:59.991311061 -0700
|
|
@@ -1362,7 +1362,7 @@ cdef class BooleanPolynomialRing(MPolyno
|
|
return R
|
|
|
|
def defining_ideal(self):
|
|
- """
|
|
+ r"""
|
|
Return `I = <x_i^2 + x_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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/plural.pyx 2020-02-26 12:46:32.801795133 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/polynomial_element.pyx 2020-02-27 10:56:29.731958111 -0700
|
|
@@ -2654,8 +2654,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"
|
|
@@ -2755,7 +2755,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
|
|
@@ -4795,7 +4795,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.
|
|
|
|
@@ -6385,8 +6385,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/polynomial_gf2x.pyx 2020-02-27 14:35:51.159778076 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx 2020-02-27 14:40:21.060772018 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx 2020-02-27 14:36:40.134885830 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/polynomial_zmod_flint.pyx 2020-02-27 14:40:56.729095964 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/real_roots.pyx 2020-02-27 14:38:08.079283628 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/skew_polynomial_element.pyx 2020-02-27 11:01:57.406185634 -0700
|
|
@@ -1649,8 +1649,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/polynomial/symmetric_reduction.pyx 2020-02-27 10:57:19.593079736 -0700
|
|
@@ -1,4 +1,4 @@
|
|
-"""
|
|
+r"""
|
|
Symmetric Reduction of Infinite Polynomials
|
|
|
|
:class:`~sage.rings.polynomial.symmetric_reduction.SymmetricReductionStrategy`
|
|
diff -up src/sage/rings/quotient_ring.py.orig src/sage/rings/quotient_ring.py
|
|
--- src/sage/rings/quotient_ring.py.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/quotient_ring.py 2020-02-26 12:35:50.055692397 -0700
|
|
@@ -1298,7 +1298,7 @@ class QuotientRing_generic(QuotientRing_
|
|
QuotientRing_nc.__init__(self, R, I, names, category=category)
|
|
|
|
def _macaulay2_init_(self, macaulay2=None):
|
|
- """
|
|
+ r"""
|
|
EXAMPLES:
|
|
|
|
Quotients of multivariate polynomial rings over `\QQ`, `\ZZ` and
|
|
diff -up src/sage/rings/rational.pyx.orig src/sage/rings/rational.pyx
|
|
--- src/sage/rings/rational.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/rational.pyx 2020-02-26 12:26:09.151654850 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/real_arb.pyx 2020-02-27 10:39:29.670017427 -0700
|
|
@@ -234,7 +234,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:
|
|
@@ -278,7 +278,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:
|
|
@@ -771,7 +771,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
|
|
@@ -817,7 +817,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
|
|
@@ -2912,7 +2912,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.
|
|
|
|
@@ -3493,7 +3493,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)`.
|
|
@@ -3595,7 +3595,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/real_double.pyx 2020-02-27 10:18:35.746129544 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/real_mpfi.pyx 2020-02-27 10:14:36.381371499 -0700
|
|
@@ -1307,7 +1307,7 @@ cdef class RealIntervalFieldElement(Ring
|
|
return self.str(10)
|
|
|
|
def _latex_(self):
|
|
- """
|
|
+ r"""
|
|
Return a latex representation of ``self``.
|
|
|
|
EXAMPLES::
|
|
@@ -4406,7 +4406,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/real_mpfr.pyx 2020-02-27 10:16:40.188177426 -0700
|
|
@@ -3896,7 +3896,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/semirings/tropical_semiring.pyx 2020-02-27 11:04:01.364022751 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/rings/tate_algebra_element.pyx 2020-02-27 14:14:01.439381378 -0700
|
|
@@ -1521,7 +1521,7 @@ cdef class TateAlgebraElement(Commutativ
|
|
return True
|
|
|
|
def __pow__(self, exponent, modulus):
|
|
- """
|
|
+ r"""
|
|
Return this element raised to the power ``exponent``.
|
|
|
|
INPUT:
|
|
@@ -2433,7 +2433,7 @@ cdef class TateAlgebraElement(Commutativ
|
|
return self._prec - self.valuation()
|
|
|
|
def log(self, prec=None):
|
|
- """
|
|
+ r"""
|
|
Return the logarithm of this series.
|
|
|
|
INPUT:
|
|
@@ -2590,7 +2590,7 @@ cdef class TateAlgebraElement(Commutativ
|
|
return total.add_bigoh(aprec)
|
|
|
|
def exp(self, prec=None):
|
|
- """
|
|
+ r"""
|
|
Return the exponential of this series.
|
|
|
|
INPUT:
|
|
@@ -3343,7 +3343,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/structure/coerce_maps.pyx 2020-02-27 11:52:18.843646230 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/symbolic/expression.pyx 2020-02-27 09:30:14.669819391 -0700
|
|
@@ -610,7 +610,7 @@ cdef class Expression(CommutativeRingEle
|
|
return new_Expression_from_GEx(self._parent, self._gobj)
|
|
|
|
def _repr_(self):
|
|
- """
|
|
+ r"""
|
|
Return string representation of this symbolic expression.
|
|
|
|
EXAMPLES::
|
|
@@ -3632,7 +3632,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.
|
|
|
|
@@ -3868,7 +3868,7 @@ cdef class Expression(CommutativeRingEle
|
|
return print_order_compare_mul(left._gobj, right._gobj)
|
|
|
|
cpdef _pow_(self, other):
|
|
- """
|
|
+ r"""
|
|
Return ``self`` raised to the power ``other``.
|
|
|
|
OUTPUT: a symbolic expression
|
|
@@ -4743,7 +4743,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.
|
|
@@ -7263,7 +7263,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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/symbolic/function.pyx 2020-02-27 15:06:07.634817327 -0700
|
|
@@ -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-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/symbolic/ring.pyx 2020-02-27 15:08:09.648492686 -0700
|
|
@@ -86,7 +86,7 @@ cdef class SymbolicRing(CommutativeRing)
|
|
return "Symbolic Ring"
|
|
|
|
def _latex_(self):
|
|
- """
|
|
+ r"""
|
|
Return latex representation of the symbolic ring.
|
|
|
|
EXAMPLES::
|
|
@@ -476,7 +476,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:
|
|
@@ -728,7 +728,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:
|
|
@@ -913,7 +913,7 @@ cdef class SymbolicRing(CommutativeRing)
|
|
return ccrepr(x._gobj)
|
|
|
|
def _latex_element_(self, Expression x):
|
|
- """
|
|
+ r"""
|
|
Returns the standard LaTeX version of the expression *x*.
|
|
|
|
EXAMPLES::
|
|
diff -up src/sage/symbolic/series.pyx.orig src/sage/symbolic/series.pyx
|
|
--- src/sage/symbolic/series.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
|
+++ src/sage/symbolic/series.pyx 2020-02-27 15:06:54.249929204 -0700
|
|
@@ -1,4 +1,4 @@
|
|
-"""
|
|
+r"""
|
|
Symbolic Series
|
|
|
|
Symbolic series are special kinds of symbolic expressions that are
|