diff --git a/src/sage/data_structures/list_of_pairs.pxd b/src/sage/data_structures/list_of_pairs.pxd index 4dbb57c201c..5b7483eb9ad 100644 --- a/src/sage/data_structures/list_of_pairs.pxd +++ b/src/sage/data_structures/list_of_pairs.pxd @@ -4,6 +4,7 @@ cdef struct pair_s: size_t first size_t second + @cython.final cdef class ListOfPairs: cdef pair_s** _lists diff --git a/src/sage/libs/linkages/padics/unram_shared.pxi b/src/sage/libs/linkages/padics/unram_shared.pxi index 2cb22461b21..e3edc87bc39 100644 --- a/src/sage/libs/linkages/padics/unram_shared.pxi +++ b/src/sage/libs/linkages/padics/unram_shared.pxi @@ -1,5 +1,6 @@ cimport cython + @cython.binding(True) def frobenius_unram(self, arithmetic=True): """ diff --git a/src/sage/libs/symmetrica/kostka.pxi b/src/sage/libs/symmetrica/kostka.pxi index 8c2656b2b17..52806829eab 100644 --- a/src/sage/libs/symmetrica/kostka.pxi +++ b/src/sage/libs/symmetrica/kostka.pxi @@ -6,6 +6,7 @@ cdef extern from 'symmetrica/def.h': INT kostka_tab(OP shape, OP content, OP result) INT kostka_tafel(OP n, OP result) + def kostka_number_symmetrica(shape, content): """ Compute the kostkanumber, i.e. the number of @@ -53,6 +54,7 @@ def kostka_number_symmetrica(shape, content): return res + def kostka_tab_symmetrica(shape, content): """ Compute the list of tableaux of given shape @@ -111,6 +113,7 @@ def kostka_tab_symmetrica(shape, content): return res + def kostka_tafel_symmetrica(n): """ Return the table of Kostka numbers of weight `n`. diff --git a/src/sage/libs/symmetrica/part.pxi b/src/sage/libs/symmetrica/part.pxi index ee94a8a1557..a6c1a1e2fa2 100644 --- a/src/sage/libs/symmetrica/part.pxi +++ b/src/sage/libs/symmetrica/part.pxi @@ -6,6 +6,7 @@ cdef extern from 'symmetrica/def.h': INT gupta_tafel(OP max, OP res) INT random_partition(OP nx, OP res) + def strict_to_odd_part_symmetrica(part): """ Implement the bijection between strict partitions @@ -36,6 +37,7 @@ def strict_to_odd_part_symmetrica(part): return res + def odd_to_strict_part_symmetrica(part): """ Implement the bijection between partitions with odd parts @@ -129,6 +131,7 @@ def gupta_nm_symmetrica(n, m): return res + def gupta_tafel_symmetrica(max): """ It computes the table of the above values. The entry diff --git a/src/sage/libs/symmetrica/plet.pxi b/src/sage/libs/symmetrica/plet.pxi index e2b82aa8b07..39cfbbe7d87 100644 --- a/src/sage/libs/symmetrica/plet.pxi +++ b/src/sage/libs/symmetrica/plet.pxi @@ -2,6 +2,7 @@ cdef extern from 'symmetrica/def.h': INT plethysm(OP s1, OP s2, OP res) INT schur_schur_plet(OP p1, OP p2, OP res) + def plethysm_symmetrica(outer, inner): cdef OP couter = callocobject(), cinner = callocobject(), cresult = callocobject() diff --git a/src/sage/libs/symmetrica/sab.pxi b/src/sage/libs/symmetrica/sab.pxi index 04c23540656..1d5506d7bd4 100644 --- a/src/sage/libs/symmetrica/sab.pxi +++ b/src/sage/libs/symmetrica/sab.pxi @@ -91,6 +91,7 @@ def sdg_symmetrica(part, perm): return res + def odg_symmetrica(part, perm): """ Calculate the irreducible matrix representation @@ -140,6 +141,7 @@ def ndg_symmetrica(part, perm): return res + def specht_dg_symmetrica(part, perm): cdef OP cpart, cperm, cD diff --git a/src/sage/libs/symmetrica/sb.pxi b/src/sage/libs/symmetrica/sb.pxi index 1d6731fdb89..5ea0b3ad62c 100644 --- a/src/sage/libs/symmetrica/sb.pxi +++ b/src/sage/libs/symmetrica/sb.pxi @@ -64,6 +64,7 @@ def mult_schubert_schubert_symmetrica(a, b): return res + def t_SCHUBERT_POLYNOM_symmetrica(a): """ Convert a Schubert polynomial to a 'regular' multivariate @@ -96,6 +97,7 @@ def t_SCHUBERT_POLYNOM_symmetrica(a): return res + def t_POLYNOM_SCHUBERT_symmetrica(a): """ Convert a multivariate polynomial a to a Schubert polynomial. @@ -135,6 +137,7 @@ def t_POLYNOM_SCHUBERT_symmetrica(a): return res + def mult_schubert_variable_symmetrica(a, i): """ Return the product of `a` and `x_i`. Note that indexing with `i` @@ -270,6 +273,7 @@ def scalarproduct_schubert_symmetrica(a, b): return res + def divdiff_schubert_symmetrica(i, a): r""" Return the result of applying the divided difference operator diff --git a/src/sage/libs/symmetrica/schur.pxi b/src/sage/libs/symmetrica/schur.pxi index a9a5c7bf1d7..a5257cf304b 100644 --- a/src/sage/libs/symmetrica/schur.pxi +++ b/src/sage/libs/symmetrica/schur.pxi @@ -404,6 +404,7 @@ def compute_schur_with_alphabet_det_symmetrica(part, length, alphabet='x'): return res + def part_part_skewschur_symmetrica(outer, inner): """ Return the skew Schur function s_{outer/inner}. @@ -430,6 +431,7 @@ def part_part_skewschur_symmetrica(outer, inner): return res + def hall_littlewood_symmetrica(part): """ Compute the so called Hall Littlewood Polynomials, i.e. @@ -526,6 +528,7 @@ def t_SCHUR_POWSYM_symmetrica(schur): return res + def t_POLYNOM_SCHUR_symmetrica(p): r""" Convert a symmetric polynomial with base ring `\QQ` or `\ZZ` into a @@ -566,6 +569,7 @@ def t_MONOMIAL_HOMSYM_symmetrica(monomial): return res + def t_MONOMIAL_ELMSYM_symmetrica(monomial): cdef OP cmonomial = callocobject(), cresult = callocobject() @@ -616,6 +620,7 @@ def t_MONOMIAL_POWSYM_symmetrica(monomial): return res + def t_POLYNOM_MONOMIAL_symmetrica(p): r""" Convert a symmetric polynomial with base ring `\QQ` or `\ZZ` into a @@ -673,6 +678,7 @@ def t_ELMSYM_POWSYM_symmetrica(elmsym): return res + def t_ELMSYM_MONOMIAL_symmetrica(elmsym): cdef OP celmsym = callocobject(), cresult = callocobject() @@ -706,6 +712,7 @@ def t_ELMSYM_HOMSYM_symmetrica(elmsym): return res + def t_POLYNOM_ELMSYM_symmetrica(p): r""" Convert a symmetric polynomial with base ring `\QQ` or `\ZZ` into a @@ -746,6 +753,7 @@ def t_HOMSYM_SCHUR_symmetrica(homsym): return res + def t_HOMSYM_POWSYM_symmetrica(homsym): cdef OP chomsym = callocobject(), cresult = callocobject() @@ -779,6 +787,7 @@ def t_HOMSYM_MONOMIAL_symmetrica(homsym): return res + def t_HOMSYM_ELMSYM_symmetrica(homsym): cdef OP chomsym = callocobject(), cresult = callocobject() @@ -829,6 +838,7 @@ def t_POWSYM_SCHUR_symmetrica(powsym): return res + def t_POWSYM_ELMSYM_symmetrica(powsym): cdef OP cpowsym = callocobject(), cresult = callocobject() @@ -845,6 +855,7 @@ def t_POWSYM_ELMSYM_symmetrica(powsym): return res + def t_POWSYM_HOMSYM_symmetrica(powsym): cdef OP cpowsym = callocobject(), cresult = callocobject() @@ -861,6 +872,7 @@ def t_POWSYM_HOMSYM_symmetrica(powsym): return res + def t_POLYNOM_POWER_symmetrica(p): r""" Convert a symmetric polynomial with base ring `\QQ` or `\ZZ` into a diff --git a/src/sage/libs/symmetrica/symmetrica.pxi b/src/sage/libs/symmetrica/symmetrica.pxi index 5786870caca..0a147d6c743 100644 --- a/src/sage/libs/symmetrica/symmetrica.pxi +++ b/src/sage/libs/symmetrica/symmetrica.pxi @@ -522,6 +522,7 @@ cdef int _op(object a, OP result) except -1: else: raise TypeError("cannot convert a (= %s) to OP" % a) + def test_integer(object x): """ Test functionality for converting between Sage's integers diff --git a/src/sage/rings/polynomial/polynomial_template.pxi b/src/sage/rings/polynomial/polynomial_template.pxi index 7d161504c54..64398898d0d 100644 --- a/src/sage/rings/polynomial/polynomial_template.pxi +++ b/src/sage/rings/polynomial/polynomial_template.pxi @@ -24,9 +24,11 @@ from sage.libs.pari.all import pari_gen import operator + def make_element(parent, args): return parent(*args) + cdef inline Polynomial_template element_shift(self, int n): if not isinstance(self, Polynomial_template): if n > 0: diff --git a/src/sage/symbolic/getitem_impl.pxi b/src/sage/symbolic/getitem_impl.pxi index c20cf1e6e31..cbc5f6b9c97 100644 --- a/src/sage/symbolic/getitem_impl.pxi +++ b/src/sage/symbolic/getitem_impl.pxi @@ -188,6 +188,7 @@ cdef class OperandsWrapper(SageObject): """ return restore_op_wrapper, (self._expr,) + def restore_op_wrapper(expr): """ TESTS:: diff --git a/src/sage/symbolic/pynac_impl.pxi b/src/sage/symbolic/pynac_impl.pxi index fbf51f4d7ec..967ff18d020 100644 --- a/src/sage/symbolic/pynac_impl.pxi +++ b/src/sage/symbolic/pynac_impl.pxi @@ -1279,6 +1279,7 @@ cdef py_numer(n): except AttributeError: return n + def py_numer_for_doctests(n): """ This function is used to test py_numer(). @@ -1390,6 +1391,7 @@ cdef py_float(n, PyObject* kwds): except TypeError: return CC(n) + def py_float_for_doctests(n, kwds): """ This function is for testing py_float. @@ -1450,6 +1452,7 @@ cdef py_tgamma(x): return CC(res) return res + def py_tgamma_for_doctests(x): """ This function is for testing py_tgamma(). @@ -1489,6 +1492,7 @@ cdef py_factorial(x): else: return py_tgamma(x+1) + def py_factorial_py(x): """ This function is a python wrapper around py_factorial(). This wrapper @@ -1510,6 +1514,7 @@ cdef py_doublefactorial(x): from sage.misc.misc_c import prod # fast balanced product return prod([n - 2*i for i in range(n//2)]) + def doublefactorial(n): """ The double factorial combinatorial function: @@ -1630,6 +1635,7 @@ cdef py_stieltjes(x): prec = 53 return mpmath_utils.call(mpmath.stieltjes, n, prec=prec) + def py_stieltjes_for_doctests(x): """ This function is for testing py_stieltjes(). @@ -1664,6 +1670,7 @@ cdef py_zeta(x): except AttributeError: return CC(x).zeta() + def py_zeta_for_doctests(x): """ This function is for testing py_zeta(). @@ -1705,6 +1712,7 @@ cdef py_exp(x): except (TypeError, ValueError): return CC(x).exp() + def py_exp_for_doctests(x): """ This function tests py_exp. @@ -1774,6 +1782,7 @@ cdef py_log(x): except (TypeError, ValueError): return CC(x).log() + def py_log_for_doctests(x): """ This function tests py_log. @@ -2195,6 +2204,7 @@ cdef py_psi2(n, x): prec = 53 return mpmath_utils.call(mpmath.psi, n, x, prec=prec) + def py_psi2_for_doctests(n, x): """ This function is a python wrapper so py_psi2 can be tested. The real tests @@ -2268,6 +2278,7 @@ cdef py_eval_unsigned_infinity(): from sage.rings.infinity import unsigned_infinity return unsigned_infinity + def py_eval_unsigned_infinity_for_doctests(): """ This function tests py_eval_unsigned_infinity. @@ -2287,6 +2298,7 @@ cdef py_eval_infinity(): from sage.rings.infinity import infinity return infinity + def py_eval_infinity_for_doctests(): """ This function tests py_eval_infinity. @@ -2306,6 +2318,7 @@ cdef py_eval_neg_infinity(): from sage.rings.infinity import minus_infinity return minus_infinity + def py_eval_neg_infinity_for_doctests(): """ This function tests py_eval_neg_infinity.