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 7ffbebc5f52..8143e7164e0 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 d69aefc7c2c..cb33525658c 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): """ computes 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): """ computes the list of tableaux of given shape @@ -113,6 +115,7 @@ def kostka_tab_symmetrica(shape, content): return res + def kostka_tafel_symmetrica(n): """ Returns 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 37a3c0ff8f0..a1065f74185 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): """ implements the bijection between strict partitions @@ -37,6 +38,7 @@ def strict_to_odd_part_symmetrica(part): return res + def odd_to_strict_part_symmetrica(part): """ implements the bijection between partitions with odd parts @@ -131,6 +133,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 b1f8450c621..4226d4033c0 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): """ """ diff --git a/src/sage/libs/symmetrica/sab.pxi b/src/sage/libs/symmetrica/sab.pxi index b7900106b35..44deb306eb9 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): """ Calculates the irreducible matrix representation @@ -144,6 +145,7 @@ def ndg_symmetrica(part, perm): return res + def specht_dg_symmetrica(part, perm): """ diff --git a/src/sage/libs/symmetrica/sb.pxi b/src/sage/libs/symmetrica/sb.pxi index b884d33dafd..dc07c197607 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): """ Converts 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): """ Converts 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): """ Returns 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""" Returns 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 82e77d0d251..1b5e062ffc2 100644 --- a/src/sage/libs/symmetrica/schur.pxi +++ b/src/sage/libs/symmetrica/schur.pxi @@ -408,6 +408,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}. @@ -434,6 +435,7 @@ def part_part_skewschur_symmetrica(outer, inner): return res + def hall_littlewood_symmetrica(part): """ computes the so called Hall Littlewood Polynomials, i.e. @@ -543,6 +545,7 @@ def t_SCHUR_POWSYM_symmetrica(schur): return res + def t_POLYNOM_SCHUR_symmetrica(p): """ Converts a symmetric polynomial with base ring QQ or ZZ into a symmetric function @@ -587,6 +590,7 @@ def t_MONOMIAL_HOMSYM_symmetrica(monomial): return res + def t_MONOMIAL_ELMSYM_symmetrica(monomial): """ @@ -649,6 +653,7 @@ def t_MONOMIAL_POWSYM_symmetrica(monomial): return res + def t_POLYNOM_MONOMIAL_symmetrica(p): """ Converts a symmetric polynomial with base ring QQ or ZZ into a symmetric function @@ -714,6 +719,7 @@ def t_ELMSYM_POWSYM_symmetrica(elmsym): return res + def t_ELMSYM_MONOMIAL_symmetrica(elmsym): """ @@ -755,6 +761,7 @@ def t_ELMSYM_HOMSYM_symmetrica(elmsym): return res + def t_POLYNOM_ELMSYM_symmetrica(p): """ Converts a symmetric polynomial with base ring QQ or ZZ into a symmetric function @@ -799,6 +806,7 @@ def t_HOMSYM_SCHUR_symmetrica(homsym): return res + def t_HOMSYM_POWSYM_symmetrica(homsym): """ @@ -840,6 +848,7 @@ def t_HOMSYM_MONOMIAL_symmetrica(homsym): return res + def t_HOMSYM_ELMSYM_symmetrica(homsym): """ @@ -902,6 +911,7 @@ def t_POWSYM_SCHUR_symmetrica(powsym): return res + def t_POWSYM_ELMSYM_symmetrica(powsym): """ @@ -922,6 +932,7 @@ def t_POWSYM_ELMSYM_symmetrica(powsym): return res + def t_POWSYM_HOMSYM_symmetrica(powsym): """ @@ -942,6 +953,7 @@ def t_POWSYM_HOMSYM_symmetrica(powsym): return res + def t_POLYNOM_POWER_symmetrica(p): """ Converts a symmetric polynomial with base ring QQ or ZZ into a symmetric function diff --git a/src/sage/libs/symmetrica/symmetrica.pxi b/src/sage/libs/symmetrica/symmetrica.pxi index 1dbe23a6675..7a43535b97a 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): """ Tests 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 31f2903f318..d01e3066223 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 f31a5498218..bf0b3c72560 100644 --- a/src/sage/symbolic/pynac_impl.pxi +++ b/src/sage/symbolic/pynac_impl.pxi @@ -1286,6 +1286,7 @@ cdef py_numer(n): except AttributeError: return n + def py_numer_for_doctests(n): """ This function is used to test py_numer(). @@ -1397,6 +1398,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. @@ -1457,6 +1459,7 @@ cdef py_tgamma(x): return CC(res) return res + def py_tgamma_for_doctests(x): """ This function is for testing py_tgamma(). @@ -1496,6 +1499,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 @@ -1517,6 +1521,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: @@ -1637,6 +1642,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(). @@ -1671,6 +1677,7 @@ cdef py_zeta(x): except AttributeError: return CC(x).zeta() + def py_zeta_for_doctests(x): """ This function is for testing py_zeta(). @@ -1712,6 +1719,7 @@ cdef py_exp(x): except (TypeError, ValueError): return CC(x).exp() + def py_exp_for_doctests(x): """ This function tests py_exp. @@ -1781,6 +1789,7 @@ cdef py_log(x): except (TypeError, ValueError): return CC(x).log() + def py_log_for_doctests(x): """ This function tests py_log. @@ -2202,6 +2211,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 @@ -2276,6 +2286,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. @@ -2295,6 +2306,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. @@ -2314,6 +2326,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.